- name: Copy dotfiles ansible.builtin.copy: src: "{{ item.src }}" dest: "{{ item.dest }}" owner: root group: root mode: 0644 with_items: - { src: 'dot.vimrc', dest: '/etc/skel/.vimrc' } - { src: 'dot.screenrc', dest: '/etc/skel/.screenrc' } - { src: 'dot.profile', dest: '/etc/skel/.profile' } - { src: 'dot.bashrc', dest: '/etc/skel/.bashrc' } - { src: 'dot.bash_profile', dest: '/etc/skel/.bash_profile' } - { src: 'dot.vimrc', dest: '/root/.vimrc' } - { src: 'dot.screenrc', dest: '/root/.screenrc' } - { src: 'dot.profile', dest: '/root/.profile' } - { src: 'dot.bashrc', dest: '/root/.bashrc' } - { src: 'dot.bash_profile', dest: '/root/.bash_profile' } - name: Remove unwanted dotfiles ansible.builtin.file: path: "{{ item }}" state: absent with_items: - /etc/skel/.bash_logout - /root/resize.log