2017-09-27 05:16:43 +08:00
|
|
|
---
|
|
|
|
- name: check if selinux is enabled
|
|
|
|
command: getenforce
|
|
|
|
register: selinuxstatus
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
2017-10-25 22:48:09 +08:00
|
|
|
always_run: true
|
2017-09-27 05:16:43 +08:00
|
|
|
|
|
|
|
- name: install policycoreutils-python to get semanage
|
|
|
|
package:
|
|
|
|
name: policycoreutils-python
|
|
|
|
state: present
|
|
|
|
when:
|
|
|
|
- selinuxstatus.stdout != 'Disabled'
|
|
|
|
|
|
|
|
- name: test if ganesha_t is already permissive
|
|
|
|
shell: |
|
|
|
|
semanage permissive -l | grep -soq ganesha_t
|
|
|
|
changed_when: false
|
|
|
|
failed_when: false
|
|
|
|
register: ganesha_t_permissive
|
|
|
|
|
|
|
|
- name: run semanage permissive -a ganesha_t
|
|
|
|
command: semanage permissive -a ganesha_t
|
|
|
|
changed_when: false
|
|
|
|
when:
|
|
|
|
- selinuxstatus.stdout != 'Disabled'
|
|
|
|
- ganesha_t_permissive.rc != 0
|