buluma.selinux

Ansible Role selinux

This role installs and sets up SELinux and the necessary libraries on your system.

GitHub Version Issues Pull Requests Downloads
github Version Issues PullRequests Ansible Role

Example Playbook

This example comes from molecule/default/converge.yml and is tested whenever there is a push, pull request, or release.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: buluma.selinux
      selinux_reboot: false
      selinux_booleans:
        - name: http_can_network_connect
        - name: abrt_anon_write
          state: false
          persistent: false

Before running this, the machine needs to be prepared. In CI, this is done using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  gather_facts: false
  become: true

  roles:
    - role: buluma.bootstrap

For more details and examples, see full explanation.

Role Variables

Default values for the variables are in defaults/main.yml:

---
# defaults file for selinux

# State can be disabled, permissive, or enforcing.
selinux_state: enforcing

# The policy, defaults can vary by distribution.
selinux_policy: "{{ _selinux_policy[ansible_os_family] | default(_selinux_policy['default']) }}"

# Should the machine reboot after changes?
selinux_reboot: true

# You can enable or disable specific booleans in this list.
# selinux_booleans:
#   - name: http_can_network_connect
#   - name: abrt_anon_write
#     state: false
#     persistent: false

Requirements

State of Used Roles

The following roles are used to prepare the system. You can use other methods to prepare your system.

Requirement GitHub Version
buluma.bootstrap Ansible Molecule Version

Context

This role works with many other roles. For more information, check the documentation of these roles.

Here is an overview of related roles:

dependencies

Compatibility

This role has been tested on these container images:

Container Tags
Alpine all
Amazon Candidate
EL all
Debian all
Fedora all
opensuse all
Ubuntu all

You need at least Ansible version 2.12. Tests have been run on:

  • The previous version.
  • The current version.
  • The development version.

If you find any issues, please report them on GitHub.

Changelog

Role History

License

Apache-2.0

Author Information

Shadow Walker

Informazioni sul progetto

Install and configure selinux and its required libraries on your system.

Installa
ansible-galaxy install buluma.selinux
Licenza
apache-2.0
Download
437.7k
Proprietario
DevOps Engineer