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