staging-sync/koji: Update /mnt/koji cleanup code
This commit is contained in:
parent
a387990755
commit
3ca066f146
1 changed files with 15 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue