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..62ca07077 --- /dev/null +++ b/changelogs/fragments/663-zos_gather_facts-update-docstring.yml @@ -0,0 +1,3 @@ +trivial: +- zos_gather_facts - cherry pick - add sample output to RETURN docstring. + (https://github.com/ansible-collections/ibm_zos_core/pull/744) \ 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