Add dirs to be mounted when building containers - centos
centos 8 stream jobs require additional dirs to be mounted when building containers. This review adds those dirs when running Centos 8 and newer versions. Change-Id: Ib1fa6bb3e69cead424837f97228ae1d829f4b2c7
This commit is contained in:
parent
3d81be6217
commit
d7e9ca5ba2
|
@ -53,6 +53,18 @@
|
|||
container_image_build_volumes:
|
||||
- "/etc/yum.repos.d:/etc/distro.repos.d:z"
|
||||
- "/etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z"
|
||||
when:
|
||||
- (ansible_distribution == 'RedHat') or (ansible_distribution_major_version|int < 8)
|
||||
|
||||
- name: Set container_image_build_volumes fact for CentOS
|
||||
set_fact:
|
||||
container_image_build_volumes:
|
||||
- "/etc/yum.repos.d:/etc/distro.repos.d:z"
|
||||
- "/etc/pki/rpm-gpg:/etc/pki/rpm-gpg:z"
|
||||
- "/etc/dnf/vars:/etc/dnf/vars:z"
|
||||
when:
|
||||
- ansible_distribution == 'CentOS'
|
||||
- ansible_distribution_major_version|int >= 8
|
||||
|
||||
- name: Check if /opt/gating_repo exists
|
||||
stat:
|
||||
|
|
Loading…
Reference in New Issue