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:53:34 +08:00
|
|
|
check_mode: no
|
2017-09-27 05:16:43 +08:00
|
|
|
|
2019-04-18 22:02:12 +08:00
|
|
|
- name: if selinux is not disable
|
2019-04-01 23:46:15 +08:00
|
|
|
when: selinuxstatus.stdout != 'Disabled'
|
2019-04-18 22:02:12 +08:00
|
|
|
block:
|
|
|
|
- name: install policycoreutils-python
|
|
|
|
package:
|
|
|
|
name: policycoreutils-python
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
|
|
|
when: ansible_distribution_major_version == '7'
|
2017-09-27 05:16:43 +08:00
|
|
|
|
2019-04-18 22:02:12 +08:00
|
|
|
- name: add ganesha_t to permissive domain
|
|
|
|
selinux_permissive:
|
|
|
|
name: ganesha_t
|
|
|
|
permissive: true
|
|
|
|
failed_when: false
|
|
|
|
when: ansible_distribution_major_version == '7'
|
2017-09-27 05:16:43 +08:00
|
|
|
|
2019-04-18 22:02:12 +08:00
|
|
|
- name: install nfs-ganesha-selinux on RHEL 8
|
|
|
|
package:
|
|
|
|
name: nfs-ganesha-selinux
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
|
|
|
when: ansible_distribution_major_version == '8'
|