diff --git a/roles/webserver/files/mirror-rsync b/roles/webserver/files/mirror-rsync deleted file mode 100644 index 5b1d5d9..0000000 --- a/roles/webserver/files/mirror-rsync +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -# Mirror rsync jobs for ftp.thunix.net - -rsync -rvltpHS --delete-excluded rsync://ftp.gnu.org/gnu/ /var/www/ftp.thunix.cf/gnu-ftp -rsync -rvltpHS --delete-excluded rsync://ftp.gnu.org/alpha/ /var/www/ftp.thunix.cf/gnu-alpha -rsync -rvltpHS --delete-excluded rsync://ftp.gnu.org/old-gnu/ /var/www/ftp.thunix.cf/gnu-old \ No newline at end of file diff --git a/roles/common/files/mirror-rsync-daily b/roles/webserver/files/mirror-rsync-daily similarity index 87% rename from roles/common/files/mirror-rsync-daily rename to roles/webserver/files/mirror-rsync-daily index 22acaf6..9756097 100644 --- a/roles/common/files/mirror-rsync-daily +++ b/roles/webserver/files/mirror-rsync-daily @@ -2,4 +2,4 @@ # Mirror rsync jobs for ftp.thunix.net that run daily rsync -rvltpHS --delete-excluded rsync://ftp.halifax.rwth-aachen.de/ubuntu-releases/ /var/www/ftp.thunix.cf/ubuntu-releases -rsync -avz --delete --safe-links rsync://rsync.apache.org/apache-dist /var/www/ftp.thunix.cf/apache/ \ No newline at end of file +rsync -avz --delete --safe-links rsync://rsync.apache.org/apache-dist /var/www/ftp.thunix.cf/apache/ diff --git a/roles/common/files/mirror-rsync b/roles/webserver/files/mirror-rsync-hourly similarity index 75% rename from roles/common/files/mirror-rsync rename to roles/webserver/files/mirror-rsync-hourly index 5b1d5d9..dd6c733 100644 --- a/roles/common/files/mirror-rsync +++ b/roles/webserver/files/mirror-rsync-hourly @@ -1,6 +1,6 @@ #!/bin/bash -# Mirror rsync jobs for ftp.thunix.net +# Mirror rsync jobs for ftp.thunix.net that run hourly rsync -rvltpHS --delete-excluded rsync://ftp.gnu.org/gnu/ /var/www/ftp.thunix.cf/gnu-ftp rsync -rvltpHS --delete-excluded rsync://ftp.gnu.org/alpha/ /var/www/ftp.thunix.cf/gnu-alpha -rsync -rvltpHS --delete-excluded rsync://ftp.gnu.org/old-gnu/ /var/www/ftp.thunix.cf/gnu-old \ No newline at end of file +rsync -rvltpHS --delete-excluded rsync://ftp.gnu.org/old-gnu/ /var/www/ftp.thunix.cf/gnu-old diff --git a/roles/webserver/tasks/mirrors.yml b/roles/webserver/tasks/mirrors.yml index 103839a..e27c02e 100644 --- a/roles/webserver/tasks/mirrors.yml +++ b/roles/webserver/tasks/mirrors.yml @@ -1,6 +1,15 @@ -- name: Add mirror rsync cron job +# Add mirror rsync cron jobs (hourly and daily) +--- +- name: Add mirror rsync cron job that run hourly copy: - src: ../files/mirror-rsync - dest: /etc/cron.daily/mirror-rsync + src: ../files/mirror-rsync-hourly + dest: /etc/cron.daily/mirror-rsync-hourly owner: root - mode: 744 \ No newline at end of file + mode: 744 + +- name: Add mirror rsync cron job that run daily + copy: + src: ../files/mirror-rsync-daily + dest: /etc/cron.daily/mirror-rsync-daily + owner: root + mode: 744