--- - name: "Ensure bash is installed" become: true ansible.builtin.package: name: "bash" state: "present" - name: "Ensure .bash(rc|_profile) and .profile exists" # This is used by different setup scripts adding their init in one of these ansible.builtin.file: path: "{{ item }}" state: "touch" mode: "0644" modification_time: "preserve" access_time: "preserve" loop: - "{{ ansible_facts['env'].HOME }}/.bashrc" - "{{ ansible_facts['env'].HOME }}/.bash_profile" - "{{ ansible_facts['env'].HOME }}/.profile"