[check_selinux_mode] Add role documentation in sphinx

This patch adds the documentation directly in the sphinx role
documentation index. All variables have been commented with a proper
description to be included automatically in the sphinx build.

This patch also fixes the facts gathering by being sure we get only the
needed facts.

Change-Id: Ifbe7bd73559b05f6655bfd396029c22345b75f4c
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
This commit is contained in:
Gael Chamoulaud (Strider) 2021-06-23 16:02:17 +02:00
parent 4e87d74227
commit a76b981cf6
No known key found for this signature in database
GPG Key ID: 4119D0305C651D66
2 changed files with 49 additions and 0 deletions

View File

@ -2,5 +2,45 @@
check_selinux_mode
==================
--------------
About The Role
--------------
An Ansible role to check SELinux status on the host(s).
Requirements
============
No requirements.
Dependencies
============
No dependencies.
Example Playbook
================
.. code-block:: yaml
- hosts: localhost
gather_facts: false
roles:
- check_selinux_mode
License
=======
Apache
Author Information
==================
**Red Hat TripleO DFG:Security**
----------------
Full Description
----------------
.. ansibleautoplugin::
:role: validations_common/roles/check_selinux_mode

View File

@ -1,4 +1,13 @@
---
- name: Ensure we get needed facts
setup:
gather_subset:
- '!all'
- '!any'
- '!min'
- distribution
- os_family
- name: Get current SELinux mode
command: getenforce
become: true