rsync mirror cdimages

certbot_on_virtu
Alexandre Iooss 2020-03-30 20:53:08 +02:00
parent 5bf423027e
commit b7d33d4e09
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
3 changed files with 54 additions and 0 deletions

View File

@ -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

View File

@ -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 %}

View File

@ -71,5 +71,43 @@
cron_time: "55 5,17"
rsync_host: ftp.lip6.fr
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:
- ftpsync
- rsync-mirror