diff --git a/playbooks/roles/mirror-update/files/openeuler-mirror-update b/playbooks/roles/mirror-update/files/openeuler-mirror-update index d9c867055c..edca7b37ef 100644 --- a/playbooks/roles/mirror-update/files/openeuler-mirror-update +++ b/playbooks/roles/mirror-update/files/openeuler-mirror-update @@ -30,11 +30,18 @@ fi BASE="/afs/.openstack.org/mirror/openeuler" K5START="k5start -t -f /etc/openeuler.keytab service/openeuler-mirror -- $TIMEOUT" +# Cleanup old repos +for REPO in openEuler-20.03-LTS-SP2 ; do + if [ -d $BASE/$REPO/ ]; then + $K5START rm -rf $BASE/$REPO/ + fi +done + # Using a foreign mirror to rsync quickly. # For a whole mirror list see https://www.openeuler.org/en/mirror/list/. # 119.8.63.103 is the openEuler official mirror in HongKong MIRROR="rsync://119.8.63.103:873/openeuler" -REPOS="openEuler-20.03-LTS-SP2 openEuler-22.03-LTS" +REPOS="openEuler-22.03-LTS" for REPO in $REPOS; do if ! [ -f $BASE/$REPO ]; then