--- # roles/shell/tasks/main.yml - name: Ensure ~/.bash_profile sources ~/.profile lineinfile: path: "{{ ansible_env.HOME }}/.bash_profile" line: '[ -f ~/.profile ] && . ~/.profile' insertafter: EOF state: present create: yes mode: "0644" - name: Ensure ~/.zprofile sources ~/.profile lineinfile: path: "{{ ansible_env.HOME }}/.zprofile" line: '[ -f ~/.profile ] && . ~/.profile' insertafter: EOF state: present create: yes mode: "0644"