OCI registry: do not use the NFS mount in staging or candidate.

Fixes #https://pagure.io/fedora-infrastructure/issue/8507

Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
Clement Verna 2020-01-07 20:50:31 +01:00 committed by Pierre-Yves Chibon
parent 13d5177ce4
commit f6914e9125

View file

@ -25,17 +25,17 @@
- { role: nfs/client, - { role: nfs/client,
mnt_dir: '/srv/registry', mnt_dir: '/srv/registry',
nfs_src_dir: "oci_registry", nfs_src_dir: "oci_registry",
when: "env != 'staging' and 'candidate' not in inventory_hostname" } when: "env != 'staging' or 'candidate' not in inventory_hostname" }
pre_tasks: pre_tasks:
- name: Create /srv/registry on staging since it does not use NFS - name: Create /srv/registry on staging and candidate since it does not use NFS
file: file:
path: /srv/registry path: /srv/registry
state: directory state: directory
owner: root owner: root
group: root group: root
mode: 0755 mode: 0755
when: "env == 'staging' and 'candidate' not in inventory_hostname" when: "env == 'staging' or 'candidate' not in inventory_hostname"
- import_tasks: "{{ tasks_path }}/yumrepos.yml" - import_tasks: "{{ tasks_path }}/yumrepos.yml"
tasks: tasks: