net_facts modules: Don't warn about defaults changing if they're not being used (#66270)

pull/65994/head
Nathaniel Case 5 years ago committed by GitHub
parent 223e1675f4
commit 3a2257c45c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- Do not emit warnings about changing network facts defaults when not using the defaults.

@ -181,7 +181,8 @@ from ansible.module_utils.network.eos.eos import eos_argument_spec
def main():
""" Main entry point for module execution
"""
Main entry point for module execution
:returns: ansible_facts
"""
@ -191,8 +192,9 @@ def main():
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()

@ -212,7 +212,10 @@ from ansible.module_utils.network.ios.ios import ios_argument_spec
def main():
""" Main entry point for AnsibleModule
"""
Main entry point for module execution
:returns: ansible_facts
"""
argument_spec = FactsArgs.argument_spec
argument_spec.update(ios_argument_spec)
@ -220,8 +223,9 @@ def main():
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()

@ -193,13 +193,15 @@ def main():
:returns: ansible_facts
"""
spec = FactsArgs.argument_spec
spec.update(iosxr_argument_spec)
argument_spec = FactsArgs.argument_spec
argument_spec.update(iosxr_argument_spec)
module = AnsibleModule(argument_spec=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()

@ -112,7 +112,10 @@ from ansible.module_utils.network.junos.junos import junos_argument_spec
def main():
""" Main entry point for AnsibleModule
"""
Main entry point for module execution
:returns: ansible_facts
"""
argument_spec = FactsArgs.argument_spec
argument_spec.update(junos_argument_spec)
@ -120,8 +123,9 @@ def main():
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()

@ -216,7 +216,10 @@ from ansible.module_utils.network.nxos.nxos import nxos_argument_spec
def main():
""" Main entry point for AnsibleModule
"""
Main entry point for module execution
:returns: ansible_facts
"""
argument_spec = FactsArgs.argument_spec
argument_spec.update(nxos_argument_spec)
@ -224,8 +227,9 @@ def main():
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()

@ -150,14 +150,14 @@ 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()

Loading…
Cancel
Save