From f108b71c295032993f2f66903de8d825caa59a36 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Wed, 10 Mar 2021 12:16:50 -0300 Subject: [PATCH 1/3] Fix execution of Github Workflow to verify ansible docs. The Github workflow Ubuntu images do not provide Ansible pre-installed anymore, and this patch forces its installation through Python's pip. Different jobs were created to test documentation with different versions of Ansible, currently 2.9 and the latest available. --- .github/workflows/docs.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b2aa5f74..2b7f782e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,8 +4,8 @@ on: - push - pull_request jobs: - check_docs: - name: Check Ansible Documentation. + check_docs_29: + name: Check Ansible Documentation with Ansible 2.9. runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -13,4 +13,20 @@ jobs: with: python-version: '3.x' - name: Run ansible-doc-test - run: ANSIBLE_LIBRARY="." python utils/ansible-doc-test roles plugins + run: | + python -m pip install "ansible < 2.10" + ANSIBLE_LIBRARY="." python utils/ansible-doc-test roles plugins + + check_docs_latest: + name: Check Ansible Documentation with latest Ansible. + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Run ansible-doc-test + run: | + python -m pip install ansible + ANSIBLE_LIBRARY="." python utils/ansible-doc-test roles plugins + From 122068cefca8ccaf5cb41af9d358ddff92d6b07d Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Wed, 10 Mar 2021 13:03:20 -0300 Subject: [PATCH 2/3] Fix documentation format for ipa_python_version description. --- roles/ipaclient/library/ipaclient_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/ipaclient/library/ipaclient_test.py b/roles/ipaclient/library/ipaclient_test.py index d5d7f718..1a80fafb 100644 --- a/roles/ipaclient/library/ipaclient_test.py +++ b/roles/ipaclient/library/ipaclient_test.py @@ -180,9 +180,9 @@ ntp_servers: type: list sample: ["ntp.example.com"] ipa_python_version: - description: - - The IPA python version as a number: - - *10000+*100+ + description: > + The IPA python version as a number: + *10000+*100+ returned: always type: int sample: 040400 From b5c579b11be770b928ed423fb5d703c65932a723 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Wed, 10 Mar 2021 13:05:20 -0300 Subject: [PATCH 3/3] Add DOCUMENTATION attribute to ipaclient/ipaclient_get_facts.py. --- roles/ipaclient/library/ipaclient_get_facts.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/ipaclient/library/ipaclient_get_facts.py b/roles/ipaclient/library/ipaclient_get_facts.py index 003715ef..b7e270fc 100644 --- a/roles/ipaclient/library/ipaclient_get_facts.py +++ b/roles/ipaclient/library/ipaclient_get_facts.py @@ -1,6 +1,15 @@ #!/usr/bin/python # -*- coding: utf-8 -*- +DOCUMENTATION = """ +--- +module: ipaclient_get_facts +short description: Get facts about IPA client and server configuration. +description: Get facts about IPA client and server configuration. +author: + - Thomas Woerner +""" + import os import re import six