mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Remove set from junos_facts as it errors out (#5670)
Fix #5636 per @ganeshnalawade
This commit is contained in:
parent
d39ae36ab1
commit
1fe0bd33f3
1 changed files with 8 additions and 8 deletions
|
@ -44,12 +44,12 @@ options:
|
|||
- The C(config_format) argument is used to specify the desired
|
||||
format of the configuration file. Devices support three
|
||||
configuration file formats. By default, the configuration
|
||||
from the device is returned as text. The other options include
|
||||
set and xml. If the xml option is chosen, the configuration file
|
||||
is returned as both xml and json.
|
||||
from the device is returned as text. The other option xml.
|
||||
If the xml option is chosen, the configuration file is
|
||||
returned as both xml and json.
|
||||
required: false
|
||||
default: text
|
||||
choices: ['xml', 'text', 'set']
|
||||
choices: ['xml', 'text']
|
||||
requirements:
|
||||
- junos-eznc
|
||||
notes:
|
||||
|
@ -68,10 +68,10 @@ EXAMPLES = """
|
|||
junos_facts:
|
||||
config: yes
|
||||
|
||||
- name: collect default set of facts and configuration in set format
|
||||
- name: collect default set of facts and configuration in text format
|
||||
junos_facts:
|
||||
config: yes
|
||||
config_format: set
|
||||
config_format: text
|
||||
|
||||
- name: collect default set of facts and configuration in XML and JSON format
|
||||
junos_facts:
|
||||
|
@ -95,7 +95,7 @@ def main():
|
|||
"""
|
||||
spec = dict(
|
||||
config=dict(type='bool'),
|
||||
config_format=dict(default='text', choices=['xml', 'set', 'text']),
|
||||
config_format=dict(default='text', choices=['xml', 'text']),
|
||||
transport=dict(default='netconf', choices=['netconf'])
|
||||
)
|
||||
|
||||
|
@ -116,7 +116,7 @@ def main():
|
|||
config_format = module.params['config_format']
|
||||
resp_config = module.config.get_config(config_format=config_format)
|
||||
|
||||
if config_format in ['text', 'set']:
|
||||
if config_format in ['text']:
|
||||
facts['config'] = resp_config
|
||||
elif config_format == "xml":
|
||||
facts['config'] = xml_to_string(resp_config)
|
||||
|
|
Loading…
Reference in a new issue