Homelab-Infra/roles/selinux_containers/tasks/labels.yml

12 lines
371 B
YAML

---
# selinux_containers/tasks/labels.yml
- name: Ensure SELinux context for container config paths
become: true
community.general.sefcontext:
target: "{{ item }}(/.*)?"
setype: container_file_t
state: present
loop: "{{ selinux_container_paths | default([]) }}"
when:
- selinux_container_paths is defined
- selinux_container_paths | length > 0