Skip to content

Commit

Permalink
Fixes patching container with RHEL8 that uses buildah
Browse files Browse the repository at this point in the history
buildah together with SELinux requires moutned folders to be
redeable. This can be achieved by setting svirt_sandbox_file_t label
on the files generated by the patch-components role.

Change-Id: I57721f697628759fecda7d4d4d10b24fd85a7499
  • Loading branch information
mpryc committed Jun 2, 2020
1 parent df36562 commit 3898af1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
mode: push
when: "'undercloud' not in groups['tester'][0]"

- name: SELinux - svirt_sandbox_file_t - allow containers to read mounted patched_rpms
shell: >
chcon -Rt svirt_sandbox_file_t /patched_rpms
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == '8' | default(false)

- name: Cleanup
hosts: localhost
tasks:
Expand Down

0 comments on commit 3898af1

Please sign in to comment.