mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-19 19:46:38 +08:00
THis moves the SELinux "handler" in roles/base to a global task file, which allows it to be reused by other roles. Eventually this should probably be a native Ansible type, but this is still an improvment. Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
21 lines
678 B
YAML
21 lines
678 B
YAML
# In tasks/selinux_module.yml (can be in a common/shared tasks directory)
|
|
- name: Compile SELinux module
|
|
ansible.builtin.shell: |
|
|
cd {{ selinux_module_dir }}
|
|
checkmodule -M -m -o {{ selinux_module_name }}.mod {{ selinux_module_name }}.te
|
|
semodule_package -o {{ selinux_module_name }}.pp -m {{ selinux_module_name }}.mod
|
|
tags:
|
|
- selinux
|
|
|
|
- name: Install SELinux module
|
|
ansible.builtin.command: semodule -i {{ selinux_module_dir }}/{{ selinux_module_name }}.pp
|
|
tags:
|
|
- selinux
|
|
|
|
- name: Cleanup SELinux module build files
|
|
ansible.builtin.file:
|
|
path: "{{ selinux_module_dir }}/{{ selinux_module_name }}.mod"
|
|
state: absent
|
|
tags:
|
|
- selinux
|