From 198476984fe2297ac15aeaf3d64d0ad11079512a Mon Sep 17 00:00:00 2001 From: ketankelkar Date: Fri, 7 Apr 2023 14:37:03 -0700 Subject: [PATCH] zos_gather_facts - add sample output to RETURN docstring (#722) * zos_gather_facts - add sample output to RETURN docstring Signed-off-by: Ketan Kelkar * add changelog fragment Signed-off-by: Ketan Kelkar * zos_gather_facts RETURN docstring - add sample sysplex_name and lpar_name values Signed-off-by: Ketan Kelkar * Update generated module doc Signed-off-by: ddimatos --------- Signed-off-by: Ketan Kelkar Signed-off-by: ddimatos Co-authored-by: ddimatos --- .../663-zos_gather_facts-update-docstring.yml | 2 ++ docs/source/modules/zos_gather_facts.rst | 24 +++++++++++++++++++ plugins/modules/zos_gather_facts.py | 19 +++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 changelogs/fragments/663-zos_gather_facts-update-docstring.yml diff --git a/changelogs/fragments/663-zos_gather_facts-update-docstring.yml b/changelogs/fragments/663-zos_gather_facts-update-docstring.yml new file mode 100644 index 000000000..d6ba48dd7 --- /dev/null +++ b/changelogs/fragments/663-zos_gather_facts-update-docstring.yml @@ -0,0 +1,2 @@ +trivial: +- zos_gather_facts - add sample output to RETURN docstring. (https://github.com/ansible-collections/ibm_zos_core/pull/722) \ No newline at end of file diff --git a/docs/source/modules/zos_gather_facts.rst b/docs/source/modules/zos_gather_facts.rst index 836421256..63bd22701 100644 --- a/docs/source/modules/zos_gather_facts.rst +++ b/docs/source/modules/zos_gather_facts.rst @@ -96,4 +96,28 @@ ansible_facts | **returned**: when collected | **type**: dict + | **sample**: + + .. code-block:: json + + [ + { + "ansible_facts": { + "arch_level": "2", + "hw_name": "SYSZD6", + "ipl_volume": "RES820", + "lpar_name": "SVLLAB01", + "primary_jes": "JES2", + "product_mod_level": "00", + "product_name": "z/OS", + "product_owner": "IBM CORP", + "product_release": "05", + "product_version": "02", + "smf_name": "3090", + "sys_name": "EC33018A", + "sysplex_name": "SVPLEX1", + "vm_name": "EC33018A" + } + } + ] diff --git a/plugins/modules/zos_gather_facts.py b/plugins/modules/zos_gather_facts.py index e18dcb288..beff12cd2 100644 --- a/plugins/modules/zos_gather_facts.py +++ b/plugins/modules/zos_gather_facts.py @@ -88,6 +88,25 @@ description: Collection of facts that are gathered from the z/OS systems. returned: when collected type: dict + sample: + [ + "ansible_facts": { + "arch_level": "2", + "hw_name": "SYSZD6", + "ipl_volume": "RES820", + "lpar_name": "SVLLAB01", + "primary_jes": "JES2", + "product_mod_level": "00", + "product_name": "z/OS", + "product_owner": "IBM CORP", + "product_release": "05", + "product_version": "02", + "smf_name": "3090", + "sys_name": "EC33018A", + "sysplex_name": "SVPLEX1", + "vm_name": "EC33018A" + } + ] """ from fnmatch import fnmatch