diff options
author | Stephen Smoogen <smooge@redhat.com> | 2016-04-06 01:57:59 +0000 |
---|---|---|
committer | Stephen Smoogen <smooge@redhat.com> | 2016-04-06 01:57:59 +0000 |
commit | cda0eebc5b0e8dec1a56cd60f52e7e47e7c264fe (patch) | |
tree | d6f6d7bcdb2d560b4e79c1ff8849b72c2a9f3fb8 | |
parent | 10e7fcd6e39afb2d73b59f721458ff8e8c593d3c (diff) | |
download | ansible-cda0eebc5b0e8dec1a56cd60f52e7e47e7c264fe.tar.gz ansible-cda0eebc5b0e8dec1a56cd60f52e7e47e7c264fe.tar.xz ansible-cda0eebc5b0e8dec1a56cd60f52e7e47e7c264fe.zip |
and we have some adds
-rw-r--r-- | files/download/download-sync.cron | 1 | ||||
-rwxr-xr-x | files/download/sync-up-archives.sh.ib01 | 28 | ||||
-rwxr-xr-x | files/download/sync-up-downloads.sh.ib01 | 4 | ||||
-rw-r--r-- | playbooks/groups/download.yml | 3 |
4 files changed, 32 insertions, 4 deletions
diff --git a/files/download/download-sync.cron b/files/download/download-sync.cron index d01dc5620..805aa97c5 100644 --- a/files/download/download-sync.cron +++ b/files/download/download-sync.cron @@ -1,3 +1,4 @@ # run twice daily rsync of download. but lock it MAILTO=smooge@gmail.com 00 11,23 * * * root /usr/local/bin/lock-wrapper sync-up-downloads "/usr/local/bin/sync-up-downloads" +00 23 * * * root /usr/local/bin/lock-wrapper sync-up-archives "/usr/local/bin/sync-up-archives" diff --git a/files/download/sync-up-archives.sh.ib01 b/files/download/sync-up-archives.sh.ib01 new file mode 100755 index 000000000..60e4ec3de --- /dev/null +++ b/files/download/sync-up-archives.sh.ib01 @@ -0,0 +1,28 @@ +#!/bin/bash + +## +## This script is used to sync data from main download servers to +## secondary server at ibiblio. +## + +RSYNC='/usr/bin/rsync' +RS_OPT="-avSHP --numeric-ids" +RS_DEADLY="--delete --delete-excluded --delete-delay --delay-updates" +ALT_EXCLUDES="" +EPL_EXCLUDES="" +FED_EXCLUDES="" + +LAST_SYNC='/usr/local/bin/last-sync' + +SERVER=dl.fedoraproject.org + +# The Buffet. +#${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-buffet0/ /srv/pub/ | tail -n2 | logger -p local0.notice -t rsync_updates_alt_stg + +# Archives +${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-archive/ /srv/pub/archive/ | tail -n2 | logger -p local0.notice -t rsync_archive + + + +# Let MM know I'm all up to date +#/usr/bin/report_mirror diff --git a/files/download/sync-up-downloads.sh.ib01 b/files/download/sync-up-downloads.sh.ib01 index 7b6662374..4edc7d8c1 100755 --- a/files/download/sync-up-downloads.sh.ib01 +++ b/files/download/sync-up-downloads.sh.ib01 @@ -27,10 +27,6 @@ ${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-epel0/ /srv/p ${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-enchilada0/ /srv/pub/fedora/ | tail -n2 | logger -p local0.notice -t rsync_fedora # Secondary ${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-secondary/ /srv/pub/fedora-secondary/ | tail -n2 | logger -p local0.notice -t rsync_2nd -# Archives -${RSYNC} ${RS_OPT} ${RS_DEADLY} ${ALT_EXCLUDES} ${SERVER}::fedora-archive/ /srv/pub/archive/ | tail -n2 | logger -p local0.notice -t rsync_archive - - # Let MM know I'm all up to date #/usr/bin/report_mirror diff --git a/playbooks/groups/download.yml b/playbooks/groups/download.yml index 82ebf2587..946f40005 100644 --- a/playbooks/groups/download.yml +++ b/playbooks/groups/download.yml @@ -53,6 +53,9 @@ - name: put in script for syncing on download-ib01 copy: src="{{ files }}/download/sync-up-downloads.sh.ib01" dest=/usr/local/bin/sync-up-downloads owner=root group=root mode=755 when: inventory_hostname == 'download-ib01.fedoraproject.org' + - name: put in script for syncing on download-ib01 + copy: src="{{ files }}/download/sync-up-archives.sh.ib01" dest=/usr/local/bin/sync-up-archives owner=root group=root mode=755 + when: inventory_hostname == 'download-ib01.fedoraproject.org' - name: put in cron job for syncing copy: src="{{ files }}/download/download-sync.cron" dest=/etc/cron.d/download-sync owner=root group=root mode=644 when: datacenter == 'ibiblio' |