Skip to content

seboolean

Collection Note

This module is part of the ansible.posix collection. To install the collection, use:

ansible-galaxy collection install ansible.posix
Added in version 1.0.0.

You need further requirements to be able to use this module, see the Requirements section for details.

Synopsis

  • Toggles SELinux booleans.

Requirements

The following Python packages are needed on the host that executes this module:

Parameters

Parameter Defaults / Choices Comments
ignore_selinux_state
bool
Useful for scenarios (chrooted environment) that you can't get the real SELinux state.
name
str
required
Name of the boolean to configure.
persistent
bool
Set to V(true) if the boolean setting should survive a reboot.
state
bool
required
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: true
    persistent: true

Authors

  • Stephen Fromm (@sfromm)