---
- name: install rsnycd configuration file
  copy:
    src: rsyncd.conf
    dest: /etc/rsyncd.conf
    mode: 0640

- name: install rsnyc systemd unit
  copy:
    src: rsync.service
    dest: /etc/systemd/system/
    mode: 0644

- name: ensure rsync is started on boot as a daemon
  systemd:
    name: rsync
    state: started
    enabled: True