rsyncd.yml 614 B

12345678910111213141516171819202122232425262728293031
  1. - name: 'Install Rsync daemon related packages'
  2. apt:
  3. pkg: '{{ item }}'
  4. state: 'installed'
  5. with_items:
  6. - 'rsync'
  7. - name: 'Create Rsync daemon configuration directory'
  8. file:
  9. path: '/etc/rsync.d'
  10. owner: 'root'
  11. group: 'root'
  12. mode: 0755
  13. state: 'directory'
  14. - name: 'Install Rsync daemon configuration'
  15. template:
  16. src: 'templates/rsyncd.conf.j2'
  17. dest: '/etc/rsyncd.conf'
  18. owner: 'root'
  19. group: 'root'
  20. mode: 0644
  21. notify:
  22. - 'Restart Rsync Daemon'
  23. - name: 'Ensure Rsync daemon is running'
  24. service:
  25. name: 'rsync'
  26. state: 'started'
  27. # vim: ft=ansible