39 lines
801 B
YAML
39 lines
801 B
YAML
---
|
|
|
|
- name: install rsync and inotify-tools
|
|
apt:
|
|
name: "{{ item }}"
|
|
update_cache: yes
|
|
cache_valid_time: 3600
|
|
state: latest
|
|
with_items:
|
|
- rsync
|
|
- inotify-tools
|
|
|
|
- name: template rsync inotify script
|
|
template:
|
|
src: "rsync-uploads.j2"
|
|
dest: "{{ di_legacy_rsync_uploads_binary_path }}"
|
|
owner: "{{ di_legacy_rsync_uploads_user }}"
|
|
group: "root"
|
|
mode: "0750"
|
|
notify:
|
|
- restart rsync_uploads
|
|
|
|
- name: template systemd unit file
|
|
template:
|
|
src: "rsync-uploads.service.j2"
|
|
dest: "{{ di_legacy_rsync_uploads_systemd_unit_path }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify:
|
|
- restart rsync_uploads
|
|
|
|
- name: enable and start rsync_uploads service
|
|
systemd:
|
|
name: "rsync-uploads.service"
|
|
state: started
|
|
enabled: yes
|
|
|