Add in cron job for grobisplitter and set rhel8 to run daily
This commit is contained in:
parent
79d6116ace
commit
fab2e5c0e1
4 changed files with 11 additions and 6 deletions
|
@ -1,2 +1,3 @@
|
||||||
30 2 * * * root /mnt/fedora/app/fi-repo/rhel/rhel6/rhel6-sync > /dev/null
|
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 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
|
||||||
|
|
1
roles/grobisplitter/files/rhel8-split.cron
Normal file
1
roles/grobisplitter/files/rhel8-split.cron
Normal file
|
@ -0,0 +1 @@
|
||||||
|
00 07 * * * root /usr/local/bin/rhel8-split.sh
|
|
@ -35,17 +35,17 @@ for ARCH in ${ARCHES}; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Begin splitting the various packages into their subtrees
|
# 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
|
if [ $? -ne 0 ]; then
|
||||||
echo "splitter ${ARCH} baseos failed"
|
echo "splitter ${ARCH} baseos failed"
|
||||||
exit
|
exit
|
||||||
fi
|
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
|
if [ $? -ne 0 ]; then
|
||||||
echo "splitter ${ARCH} appstream failed"
|
echo "splitter ${ARCH} appstream failed"
|
||||||
exit
|
exit
|
||||||
fi
|
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
|
if [ $? -ne 0 ]; then
|
||||||
echo "splitter ${ARCH} codeready failed"
|
echo "splitter ${ARCH} codeready failed"
|
||||||
exit
|
exit
|
||||||
|
@ -66,12 +66,12 @@ for ARCH in ${ARCHES}; do
|
||||||
|
|
||||||
# Build out the repos we have and merge them together with
|
# Build out the repos we have and merge them together with
|
||||||
# mergerepo -k
|
# mergerepo -k
|
||||||
echo "Merge all the repos"
|
echo "Merging all the repos"
|
||||||
repos=""
|
repos=""
|
||||||
for i in $( ls -1 ); do
|
for i in $( ls -1 ); do
|
||||||
repos+="-r $i "
|
repos+="-r $i "
|
||||||
done
|
done
|
||||||
mergerepo_c -v -k ${repos}
|
mergerepo_c -k ${repos}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Cleanup the trash
|
# Cleanup the trash
|
||||||
|
|
|
@ -24,4 +24,7 @@
|
||||||
tags:
|
tags:
|
||||||
- grobi
|
- 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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue