mirror-env/roles/rsync/tasks/main.yml

22 lines
488 B
YAML
Executable File

- name: install rsync
apt:
name: rsync
state: present
update_cache: yes
- name: copy rsync configs
template:
src: "{{ role_path }}/templates/{{ item.src }}"
dest: /etc/{{ item.dest }}
owner: root
group: root
mode: 0644
loop:
- { src: "rsyncd.conf.j2", dest: "rsyncd.conf" }
- { src: "rsyncd-filter.conf.j2", dest: "rsyncd-filter.conf" }
- name: enable and start rsync daemon
systemd:
name: rsync
enabled: true
state: started