diff --git a/roles/batcave/files/sync-rhn b/roles/batcave/files/sync-rhn index 5ecececcde..140b3982e8 100644 --- a/roles/batcave/files/sync-rhn +++ b/roles/batcave/files/sync-rhn @@ -1,2 +1,3 @@ 30 2 * * * root /mnt/fedora/app/fi-repo/rhel/rhel6/rhel6-sync > /dev/null 30 3 * * * root /mnt/fedora/app/fi-repo/rhel/rhel7/rhel7-sync > /dev/null +30 4 * * * root /mnt/fedora/app/fi-repo/rhel/rhel8/rhel8-sync > /dev/null diff --git a/roles/grobisplitter/files/rhel8-split.cron b/roles/grobisplitter/files/rhel8-split.cron new file mode 100644 index 0000000000..0f53e34c33 --- /dev/null +++ b/roles/grobisplitter/files/rhel8-split.cron @@ -0,0 +1 @@ +00 07 * * * root /usr/local/bin/rhel8-split.sh diff --git a/roles/grobisplitter/files/rhel8-split.sh b/roles/grobisplitter/files/rhel8-split.sh index 184944c5f9..3366ed0490 100755 --- a/roles/grobisplitter/files/rhel8-split.sh +++ b/roles/grobisplitter/files/rhel8-split.sh @@ -35,17 +35,17 @@ for ARCH in ${ARCHES}; do fi # Begin splitting the various packages into their subtrees - ${BINDIR}/splitter.py --action hardlink --target RHEL-8-001 --create-repos ${ARCHDIR}/rhel-8-for-${ARCH}-baseos-rpms/ --only-defaults + ${BINDIR}/splitter.py --action hardlink --target RHEL-8-001 --create-repos ${ARCHDIR}/rhel-8-for-${ARCH}-baseos-rpms/ --only-defaults &> /dev/null if [ $? -ne 0 ]; then echo "splitter ${ARCH} baseos failed" exit fi - ${BINDIR}/splitter.py --action hardlink --target RHEL-8-002 --create-repos ${ARCHDIR}/rhel-8-for-${ARCH}-appstream-rpms/ --only-defaults + ${BINDIR}/splitter.py --action hardlink --target RHEL-8-002 --create-repos ${ARCHDIR}/rhel-8-for-${ARCH}-appstream-rpms/ --only-defaults &> /dev/null if [ $? -ne 0 ]; then echo "splitter ${ARCH} appstream failed" exit fi - ${BINDIR}/splitter.py --action hardlink --target RHEL-8-003 --create-repos ${ARCHDIR}/codeready-builder-for-rhel-8-${ARCH}-rpms/ + ${BINDIR}/splitter.py --action hardlink --target RHEL-8-003 --create-repos ${ARCHDIR}/codeready-builder-for-rhel-8-${ARCH}-rpms/ &> /dev/null if [ $? -ne 0 ]; then echo "splitter ${ARCH} codeready failed" exit @@ -66,12 +66,12 @@ for ARCH in ${ARCHES}; do # Build out the repos we have and merge them together with # mergerepo -k - echo "Merge all the repos" + echo "Merging all the repos" repos="" for i in $( ls -1 ); do repos+="-r $i " done - mergerepo_c -v -k ${repos} + mergerepo_c -k ${repos} popd # Cleanup the trash diff --git a/roles/grobisplitter/tasks/main.yml b/roles/grobisplitter/tasks/main.yml index 8c3ec98513..a96cf9c634 100644 --- a/roles/grobisplitter/tasks/main.yml +++ b/roles/grobisplitter/tasks/main.yml @@ -24,4 +24,7 @@ tags: - grobi -## Cron job goes here. +- name: daily cron job to split and merge repos + copy: src={{item}} dest=/etc/cron.d/ mode=0644 + with_items: + - rhel8-split.cron