- name: 'Install Rsync daemon related packages' apt: pkg: '{{ item }}' state: 'installed' with_items: - 'rsync' - name: 'Create Rsync daemon configuration directory' file: path: '/etc/rsync.d' owner: 'root' group: 'root' mode: 0755 state: 'directory' - name: 'Install Rsync daemon configuration' template: src: 'templates/rsyncd.conf.j2' dest: '/etc/rsyncd.conf' owner: 'root' group: 'root' mode: 0644 notify: - 'Restart Rsync Daemon' - name: 'Ensure Rsync daemon is running' service: name: 'rsync' state: 'started' # vim: ft=ansible