rsync mirror cdimages
parent
5bf423027e
commit
b7d33d4e09
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
# 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: Configure ftpsync cron
|
||||||
|
template:
|
||||||
|
src: rsync-mirror-cron.j2
|
||||||
|
dest: /etc/cron.d/rsync-mirror
|
|
@ -0,0 +1,4 @@
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
{% for i in rsync_mirror %}
|
||||||
|
{{ i.cron_time }} * * * mirror rsync --times --links --hard-links --partial --block-size=8192 --recursive --exclude *-dvd-* --exclude source/ --verbose --stats --delete-after rsync://{{ i.rsync_host }}/{{ i.rsync_path }} {{ i.dest }} | tee -a "/var/log/mirror/{{ i.name }}.log"
|
||||||
|
{% endfor %}
|
|
@ -71,5 +71,43 @@
|
||||||
cron_time: "55 5,17"
|
cron_time: "55 5,17"
|
||||||
rsync_host: ftp.lip6.fr
|
rsync_host: ftp.lip6.fr
|
||||||
rsync_path: Ubuntu/archive/
|
rsync_path: Ubuntu/archive/
|
||||||
|
|
||||||
|
rsync_mirror:
|
||||||
|
- name: videolan
|
||||||
|
dest: /pubftp/pub/videolan
|
||||||
|
cron_time: "03 10,14,18,22,2,6"
|
||||||
|
rsync_host: rsync.videolan.org
|
||||||
|
rsync_path: videolan-ftp
|
||||||
|
|
||||||
|
- name: ubuntu
|
||||||
|
dest: /pubftp/pub/distributions/linux/ubuntu
|
||||||
|
cron_time: "00 5"
|
||||||
|
rsync_host: cdimage.ubuntu.com
|
||||||
|
rsync_path: cdimage/ubuntu/releases
|
||||||
|
|
||||||
|
- name: xubuntu
|
||||||
|
dest: /pubftp/pub/distributions/linux/xubuntu
|
||||||
|
cron_time: "00 5"
|
||||||
|
rsync_host: cdimage.ubuntu.com
|
||||||
|
rsync_path: cdimage/xubuntu/releases
|
||||||
|
|
||||||
|
- name: kubuntu
|
||||||
|
dest: /pubftp/pub/distributions/linux/kubuntu
|
||||||
|
cron_time: "00 5"
|
||||||
|
rsync_host: cdimage.ubuntu.com
|
||||||
|
rsync_path: cdimage/kubuntu/releases
|
||||||
|
|
||||||
|
- name: lubuntu
|
||||||
|
dest: /pubftp/pub/distributions/linux/lubuntu
|
||||||
|
cron_time: "00 5"
|
||||||
|
rsync_host: cdimage.ubuntu.com
|
||||||
|
rsync_path: cdimage/lubuntu/releases
|
||||||
|
|
||||||
|
- name: ubuntu-mate
|
||||||
|
dest: /pubftp/pub/distributions/linux/ubuntu-mate
|
||||||
|
cron_time: "00 5"
|
||||||
|
rsync_host: cdimage.ubuntu.com
|
||||||
|
rsync_path: cdimage/ubuntu-mate/releases
|
||||||
roles:
|
roles:
|
||||||
- ftpsync
|
- ftpsync
|
||||||
|
- rsync-mirror
|
||||||
|
|
Loading…
Reference in New Issue