diff options
author | CaptTrews <capttrews@gmail.com> | 2020-01-16 15:50:24 +0000 |
---|---|---|
committer | CaptTrews <capttrews@gmail.com> | 2020-01-16 15:50:24 +0000 |
commit | 6b6166151faa3d811ae0ec3010a89e518a26287b (patch) | |
tree | 9cf59872c2ddc7e99595db4f47c72a7ce08b6c10 /plugins/modules/vyos_facts.py | |
parent | d31b74ba6c74a6e3cdebd80b9eb5272aeb9b0fb4 (diff) | |
download | vyos.vyos-6b6166151faa3d811ae0ec3010a89e518a26287b.tar.gz vyos.vyos-6b6166151faa3d811ae0ec3010a89e518a26287b.zip |
Updated from network content collector
Signed-off-by: CaptTrews <capttrews@gmail.com>
Diffstat (limited to 'plugins/modules/vyos_facts.py')
-rw-r--r-- | plugins/modules/vyos_facts.py | 64 |
1 files changed, 28 insertions, 36 deletions
diff --git a/plugins/modules/vyos_facts.py b/plugins/modules/vyos_facts.py index 125b256..9eaa278 100644 --- a/plugins/modules/vyos_facts.py +++ b/plugins/modules/vyos_facts.py @@ -15,48 +15,40 @@ ANSIBLE_METADATA = { } -DOCUMENTATION = """ ---- -module: vyos_facts -version_added: 2.2 +DOCUMENTATION = """module: vyos_facts short_description: Get facts about vyos devices. description: - - Collects facts from network devices running the vyos operating - system. This module places the facts gathered in the fact tree keyed by the - respective resource name. The facts module will always collect a - base set of facts from the device and can enable or disable - collection of additional facts. +- Collects facts from network devices running the vyos operating system. This module + places the facts gathered in the fact tree keyed by the respective resource name. The + facts module will always collect a base set of facts from the device and can enable + or disable collection of additional facts. author: - - Nathaniel Case (@qalthos) - - Nilashish Chakraborty (@Nilashishc) - - Rohit Thakur (@rohitthakur2590) -extends_documentation_fragment: vyos +- Nathaniel Case (@qalthos) +- Nilashish Chakraborty (@Nilashishc) +- Rohit Thakur (@rohitthakur2590) +extends_documentation_fragment: +- vyos.vyos.vyos notes: - - Tested against VyOS 1.1.8 (helium). - - This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html). +- Tested against VyOS 1.1.8 (helium). +- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html). options: gather_subset: description: - - When supplied, this argument will restrict the facts collected - to a given subset. Possible values for this argument include - all, default, config, and neighbors. Can specify a list of - values to include a larger subset. Values can also be used - with an initial C(M(!)) to specify that a specific subset should - not be collected. + - When supplied, this argument will restrict the facts collected to a given subset. Possible + values for this argument include all, default, config, and neighbors. Can specify + a list of values to include a larger subset. Values can also be used with an + initial C(M(!)) to specify that a specific subset should not be collected. required: false - default: "!config" + default: '!config' gather_network_resources: description: - - When supplied, this argument will restrict the facts collected - to a given subset. Possible values for this argument include - all and the resources like interfaces. - Can specify a list of values to include a larger subset. Values - can also be used with an initial C(M(!)) to specify that a - specific subset should not be collected. - Valid subsets are 'all', 'interfaces', 'l3_interfaces', 'lag_interfaces', - 'lldp_global', 'lldp_interfaces'. + - When supplied, this argument will restrict the facts collected to a given subset. + Possible values for this argument include all and the resources like interfaces. + Can specify a list of values to include a larger subset. Values can also be + used with an initial C(M(!)) to specify that a specific subset should not be + collected. Valid subsets are 'all', 'interfaces', 'l3_interfaces', 'lag_interfaces', + 'lldp_global', 'lldp_interfaces'. required: false - version_added: "2.9" """ EXAMPLES = """ @@ -158,17 +150,17 @@ def main(): :returns: ansible_facts """ argument_spec = FactsArgs.argument_spec - argument_spec.update(vyos_argument_spec) module = AnsibleModule( argument_spec=argument_spec, supports_check_mode=True ) - warnings = [ - "default value for `gather_subset` " - "will be changed to `min` from `!config` v2.11 onwards" - ] + warnings = [] + if module.params["gather_subset"] == "!config": + warnings.append( + "default value for `gather_subset` will be changed to `min` from `!config` v2.11 onwards" + ) result = Facts(module).get_facts() |