From 5823307e67097a2bc6ab5180b50c93557d7f9bf6 Mon Sep 17 00:00:00 2001 From: "Gael Chamoulaud (Strider)" Date: Wed, 23 Jun 2021 14:12:16 +0200 Subject: [PATCH] [check_disk_space] 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 disables the fact gathering as this validation doesn't use them at all. Change-Id: I6e4b95faadf2e300030d476c75e6283237b43719 Signed-off-by: Gael Chamoulaud (Strider) --- doc/source/roles/role-check_disk_space.rst | 45 +++++++++++++++++++ .../playbooks/check-disk-space.yaml | 1 + .../roles/check_disk_space/defaults/main.yml | 4 ++ 3 files changed, 50 insertions(+) diff --git a/doc/source/roles/role-check_disk_space.rst b/doc/source/roles/role-check_disk_space.rst index fb45c14..14133e6 100644 --- a/doc/source/roles/role-check_disk_space.rst +++ b/doc/source/roles/role-check_disk_space.rst @@ -2,5 +2,50 @@ check_disk_space ================ +-------------- +About The Role +-------------- + +An Ansible role to check that the partitioning schema on the host(s) has enough +free space. + +Requirements +============ + +No requirements. + +Dependencies +============ + +No dependencies. + +Example Playbook +================ + +.. code-block:: yaml + + - hosts: localhost + gather_facts: false + vars: + volumes: + - { mount: /home, min_size: 25 } + - { mount: /, min_size: 50 } + roles: + - check_disk_space + +License +======= + +Apache + +Author Information +================== + +**Red Hat TripleO DFG:DF Squad:VF** + +---------------- +Full Description +---------------- + .. ansibleautoplugin:: :role: validations_common/roles/check_disk_space diff --git a/validations_common/playbooks/check-disk-space.yaml b/validations_common/playbooks/check-disk-space.yaml index 0f180e7..baa83c5 100644 --- a/validations_common/playbooks/check-disk-space.yaml +++ b/validations_common/playbooks/check-disk-space.yaml @@ -1,5 +1,6 @@ --- - hosts: localhost + gather_facts: false vars: metadata: name: Verify server fits the disk space requirements diff --git a/validations_common/roles/check_disk_space/defaults/main.yml b/validations_common/roles/check_disk_space/defaults/main.yml index 1484cfd..cc25bac 100644 --- a/validations_common/roles/check_disk_space/defaults/main.yml +++ b/validations_common/roles/check_disk_space/defaults/main.yml @@ -1,4 +1,8 @@ --- +# Volumes partitioning schema +# A list of dictionary.ies containing: +# - mount point(s) +# - min_size (Minimum free space required in GB) volumes: - {mount: /var/lib/docker, min_size: 10} - {mount: /var/lib/config-data, min_size: 3}