ansible.posix.seboolean – Toggles SELinux booleans

From Get docs
Ansible/docs/2.11/collections/ansible/posix/seboolean module


ansible.posix.seboolean – Toggles SELinux booleans

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.seboolean.


New in version 1.0.0: of ansible.posix


Synopsis

  • Toggles SELinux booleans.

Requirements

The below requirements are needed on the host that executes this module.

  • libselinux-python
  • libsemanage-python

Parameters

Parameter Choices/Defaults Comments

ignore_selinux_state

boolean

  • no

  • yes

Useful for scenarios (chrooted environment) that you can't get the real SELinux state.

name

string / required

Name of the boolean to configure.

persistent

boolean

  • no

  • yes

Set to yes if the boolean setting should survive a reboot.

state

boolean / required

  • no
  • yes

Desired boolean value



Notes

Note

  • Not tested on any Debian based system.


Examples

- name: Set httpd_can_network_connect flag on and keep it persistent across reboots
  ansible.posix.seboolean:
    name: httpd_can_network_connect
    state: yes
    persistent: yes

Authors

  • Stephen Fromm (@sfromm)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/ansible/posix/seboolean_module.html