ansible.posix.selinux – Change policy and state of SELinux¶
Note
This plugin is part of the ansible.posix collection (version 1.1.1).
To install it use: ansible-galaxy collection install ansible.posix
.
To use it in a playbook, specify: ansible.posix.selinux
.
New in version 1.0.0: of ansible.posix
Synopsis¶
Configures the SELinux mode and policy.
A reboot may be required after usage.
Ansible will not issue this reboot but will let you know when it is required.
Requirements¶
The below requirements are needed on the host that executes this module.
libselinux-python
Parameters¶
Examples¶
- name: Enable SELinux
ansible.posix.selinux:
policy: targeted
state: enforcing
- name: Put SELinux in permissive mode, logging actions that would be blocked.
ansible.posix.selinux:
policy: targeted
state: permissive
- name: Disable SELinux
ansible.posix.selinux:
state: disabled
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Derek Carter (@goozbach) <goozbach@friocorte.com>