summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Sprygada <psprygada@ansible.com>2016-06-07 21:40:27 -0400
committerPeter Sprygada <psprygada@ansible.com>2016-06-07 21:43:17 -0400
commite7e295b693ac3d6540af55c7b07716439e591e8f (patch)
treee89af257ac25194b3877de0babdba19792d329ad
parenta8072f9ef0d0aec054b9fd881c7dbae176cd3e58 (diff)
downloadansible-modules-core-e7e295b693ac3d6540af55c7b07716439e591e8f.tar.gz
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
-rw-r--r--network/junos/junos_facts.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/network/junos/junos_facts.py b/network/junos/junos_facts.py
index 373ab74f..c310e78f 100644
--- a/network/junos/junos_facts.py
+++ b/network/junos/junos_facts.py
@@ -37,8 +37,8 @@ options:
is then included in return facts. By default, the configuration
is returned as text. The C(config_format) can be used to return
different Junos configuration formats.
- required: true
- default: false
+ required: false
+ default: null
config_format:
description:
- The C(config_format) argument is used to specify the desired
@@ -90,7 +90,7 @@ def main():
""" Main entry point for AnsibleModule
"""
spec = dict(
- config=dict(required=True, type='bool'),
+ config=dict(type='bool'),
config_format=dict(default='text', choices=['xml', 'set', 'text']),
transport=dict(default='netconf', choices=['netconf'])
)
@@ -108,7 +108,7 @@ def main():
facts['version_info'] = dict(facts['version_info'])
- if module.params['config']:
+ if module.params['config'] is True:
config_format = module.params['config_format']
resp_config = module.get_config( config_format=config_format)