48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
---
|
|
# For installation instruction, see /usr/share/doc/ftpsync/README.md.gz
|
|
# Not everything is up to date in this README, be careful!
|
|
- name: Install ftpsync
|
|
apt:
|
|
update_cache: true
|
|
name: ftpsync
|
|
register: apt_result
|
|
retries: 3
|
|
until: apt_result is succeeded
|
|
|
|
# cron run as mirror user
|
|
- name: Add the mirror user
|
|
user:
|
|
name: mirror
|
|
home: /var/mirror # unused, should be something empty
|
|
shell: /bin/false
|
|
|
|
- name: Copy ftpsync configurations
|
|
template:
|
|
src: ftpsync.conf.j2
|
|
dest: "/etc/ftpsync/ftpsync-{{ item.name }}.conf"
|
|
loop: "{{ ftpsync }}"
|
|
|
|
- name: Configure ftpsync cron
|
|
template:
|
|
src: ftpsync-cron.j2
|
|
dest: /etc/cron.d/ftpsync
|
|
|
|
- name: Indicate role in motd
|
|
template:
|
|
src: update-motd.d/05-service.j2
|
|
dest: /etc/update-motd.d/05-ftpsync
|
|
mode: 0755
|
|
|
|
- name: Copy configuration files
|
|
template:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
mode: 0644
|
|
loop:
|
|
- src: html/HEADER.html.j2
|
|
dest: /pubftp/.html/HEADER.html
|
|
- src: html/FOOTER.html.j2
|
|
dest: /pubftp/.html/FOOTER.html
|
|
- src: html/style.min.css.j2
|
|
dest: /pubftp/.html/style.min.css
|