From 3ca066f1469af3f8120f0c696b0615ed2fc79075 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 5 Jul 2025 10:49:06 +0200 Subject: [PATCH] staging-sync/koji: Update /mnt/koji cleanup code --- playbooks/manual/staging-sync/koji.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/playbooks/manual/staging-sync/koji.yml b/playbooks/manual/staging-sync/koji.yml index f82da33149..f37a6dddec 100644 --- a/playbooks/manual/staging-sync/koji.yml +++ b/playbooks/manual/staging-sync/koji.yml @@ -97,19 +97,18 @@ tasks: - name: Stop nfs-server service: name=nfs-server state=stopped - - name: Unmount /mnt/fedora_koji/koji/ostree - mount: name=/mnt/fedora_koji/koji/ostree state=unmounted - - name: Unmount /mnt/fedora_koji/koji/compose/ostree - mount: name=/mnt/fedora_koji/koji/compose/ostree state=unmounted - - name: Unmount /mnt/fedora_koji - mount: name=/mnt/fedora_koji state=unmounted - - name: Wipe fedora_koji volume - filesystem: dev=/dev/GuestVolGroup00/fedora_koji fstype=xfs force=yes - - name: Mount newly-created empty koji filesystem - mount: name=/mnt/fedora_koji src=/dev/GuestVolGroup00/fedora_koji fstype=xfs state=mounted + - name: Unmount NFS on hub + ansible.builtin.mount: name={{item}} state=unmounted + with_items: + - /mnt/fedora_koji_prod + - /mnt/koji/ostree + - /mnt/koji/compose/ostree + - name: Wipe fedora_koji directory + ansible.builtin.file: name=/mnt/fedora_koji state=absent - name: Recreate koji directory structure ansible.builtin.file: name={{item}} state=directory owner=apache group=apache setype=httpd_sys_rw_content_t with_items: + - /mnt/fedora_koji - /mnt/fedora_koji/koji - /mnt/koji/compose - /mnt/koji/compose/updates @@ -120,6 +119,12 @@ - /mnt/koji/vol - /mnt/koji/work # TODO recreate directories under /mnt/koji/compose (which ones?) that composer expects to exist + - name: Mount NFS on hub + ansible.builtin.mount: name={{item}} state=mounted + with_items: + - /mnt/fedora_koji_prod + - /mnt/koji/ostree + - /mnt/koji/compose/ostree - name: Symlink production volume ansible.builtin.file: src=/mnt/fedora_koji_prod/koji dest=/mnt/koji/vol/prod state=link - name: Restart nfs-server