Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions library/junos_get_facts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ def main():
dev.close()
dev.facts['has_2RE'] = dev.facts['2RE']
del dev.facts['2RE'] # Ansible doesn't allow variables starting with numbers
# Ansible 2 doesn't like custom objects in the return value.
# Convert the version_info key from a junos.version_info object to a dict
dev.facts['version_info'] = dict(dev.facts['version_info'])
m_results['facts'] = dev.facts
if m_args['savedir'] is not None:
fname = "{0}/{1}-facts.json".format(m_args['savedir'], dev.facts['hostname'])
Expand Down