1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

removes requirement for config argument to be specified in junos_facts

The config argument is optional and should not be required.  This
removes the required attribute from the config argument.

fixes #3878
This commit is contained in:
Peter Sprygada 2016-06-07 21:40:27 -04:00 committed by Matt Clay
parent 7747be71b4
commit d8cb09a121

View file

@ -37,8 +37,8 @@ options:
is then included in return facts. By default, the configuration is then included in return facts. By default, the configuration
is returned as text. The C(config_format) can be used to return is returned as text. The C(config_format) can be used to return
different Junos configuration formats. different Junos configuration formats.
required: true required: false
default: false default: null
config_format: config_format:
description: description:
- The C(config_format) argument is used to specify the desired - The C(config_format) argument is used to specify the desired
@ -90,7 +90,7 @@ def main():
""" Main entry point for AnsibleModule """ Main entry point for AnsibleModule
""" """
spec = dict( spec = dict(
config=dict(required=True, type='bool'), config=dict(type='bool'),
config_format=dict(default='text', choices=['xml', 'set', 'text']), config_format=dict(default='text', choices=['xml', 'set', 'text']),
transport=dict(default='netconf', choices=['netconf']) transport=dict(default='netconf', choices=['netconf'])
) )
@ -108,7 +108,7 @@ def main():
facts['version_info'] = dict(facts['version_info']) facts['version_info'] = dict(facts['version_info'])
if module.params['config']: if module.params['config'] is True:
config_format = module.params['config_format'] config_format = module.params['config_format']
resp_config = module.get_config( config_format=config_format) resp_config = module.get_config( config_format=config_format)