--- - hosts: all become: yes become_method: sudo tasks: - name: copy dotfiles copy: src={{ item.src }} dest={{ item.dest }} backup=no with_items: - { src: 'root-dotfiles/bashrc', dest: '/root/.bashrc' } - { src: 'root-dotfiles/bash-preexec', dest: '/root/.bash-preexec' } - { src: 'root-dotfiles/vimrc', dest: '/root/.vimrc' }