mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-19 19:46:38 +08:00
anubis-el: set correct selinux labels for podman
selinux was preventing anubis from reading its policy file. So, set the right context here so it is happy. Note that we cannot use :Z in the podman call, because it runs as the anubis user which cannot chcon those files on the host. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
@@ -84,6 +84,25 @@
|
|||||||
- config
|
- config
|
||||||
- anubis
|
- anubis
|
||||||
|
|
||||||
|
- name: Set SELinux context for anubis directory
|
||||||
|
community.general.sefcontext:
|
||||||
|
target: "/srv/anubis(/.*)?"
|
||||||
|
setype: container_file_t
|
||||||
|
state: present
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- anubis
|
||||||
|
- selinux
|
||||||
|
|
||||||
|
- name: Apply SELinux changes to anubis directory
|
||||||
|
ansible.builtin.command: restorecon -irv "/srv/anubis/"
|
||||||
|
register: restorecon_output
|
||||||
|
changed_when: restorecon_output.stdout is defined and restorecon_output.stdout | length > 0
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
- anubis
|
||||||
|
- selinux
|
||||||
|
|
||||||
# This service calls podman to pull the anubis container,
|
# This service calls podman to pull the anubis container,
|
||||||
# then sets various env variables for the service and runs it.
|
# then sets various env variables for the service and runs it.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user