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:
|
tasks:
|
||||||
- name: Stop nfs-server
|
- name: Stop nfs-server
|
||||||
service: name=nfs-server state=stopped
|
service: name=nfs-server state=stopped
|
||||||
- name: Unmount /mnt/fedora_koji/koji/ostree
|
- name: Unmount NFS on hub
|
||||||
mount: name=/mnt/fedora_koji/koji/ostree state=unmounted
|
ansible.builtin.mount: name={{item}} state=unmounted
|
||||||
- name: Unmount /mnt/fedora_koji/koji/compose/ostree
|
with_items:
|
||||||
mount: name=/mnt/fedora_koji/koji/compose/ostree state=unmounted
|
- /mnt/fedora_koji_prod
|
||||||
- name: Unmount /mnt/fedora_koji
|
- /mnt/koji/ostree
|
||||||
mount: name=/mnt/fedora_koji state=unmounted
|
- /mnt/koji/compose/ostree
|
||||||
- name: Wipe fedora_koji volume
|
- name: Wipe fedora_koji directory
|
||||||
filesystem: dev=/dev/GuestVolGroup00/fedora_koji fstype=xfs force=yes
|
ansible.builtin.file: name=/mnt/fedora_koji state=absent
|
||||||
- name: Mount newly-created empty koji filesystem
|
|
||||||
mount: name=/mnt/fedora_koji src=/dev/GuestVolGroup00/fedora_koji fstype=xfs state=mounted
|
|
||||||
- name: Recreate koji directory structure
|
- name: Recreate koji directory structure
|
||||||
ansible.builtin.file: name={{item}} state=directory owner=apache group=apache setype=httpd_sys_rw_content_t
|
ansible.builtin.file: name={{item}} state=directory owner=apache group=apache setype=httpd_sys_rw_content_t
|
||||||
with_items:
|
with_items:
|
||||||
|
- /mnt/fedora_koji
|
||||||
- /mnt/fedora_koji/koji
|
- /mnt/fedora_koji/koji
|
||||||
- /mnt/koji/compose
|
- /mnt/koji/compose
|
||||||
- /mnt/koji/compose/updates
|
- /mnt/koji/compose/updates
|
||||||
|
@ -120,6 +119,12 @@
|
||||||
- /mnt/koji/vol
|
- /mnt/koji/vol
|
||||||
- /mnt/koji/work
|
- /mnt/koji/work
|
||||||
# TODO recreate directories under /mnt/koji/compose (which ones?) that composer expects to exist
|
# 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
|
- name: Symlink production volume
|
||||||
ansible.builtin.file: src=/mnt/fedora_koji_prod/koji dest=/mnt/koji/vol/prod state=link
|
ansible.builtin.file: src=/mnt/fedora_koji_prod/koji dest=/mnt/koji/vol/prod state=link
|
||||||
- name: Restart nfs-server
|
- name: Restart nfs-server
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue