25 lines
783 B
YAML
25 lines
783 B
YAML
---
|
|
- name: Install deps
|
|
yum:
|
|
name:
|
|
- policycoreutils-python
|
|
- selinux-policy-devel
|
|
state: present
|
|
when: ansible_distribution == 'CentOS'
|
|
|
|
- name: Check enabled SELinux modules
|
|
shell: semanage module -l
|
|
register: enabled_modules
|
|
when: ansible_distribution == 'CentOS'
|
|
|
|
- name: Copy jingrow_selinux policy
|
|
copy: src=jingrow_selinux.te dest=/root/jingrow_selinux.te
|
|
register: dest_jingrow_selinux_te
|
|
when: ansible_distribution == 'CentOS'
|
|
|
|
- name: Compile jingrow_selinux policy
|
|
shell: "make -f /usr/share/selinux/devel/Makefile jingrow_selinux.pp && semodule -i jingrow_selinux.pp"
|
|
args:
|
|
chdir: /root/
|
|
when: "ansible_distribution == 'CentOS' and enabled_modules.stdout.find('jingrow_selinux') == -1 or dest_jingrow_selinux_te.changed"
|
|
... |