junos_facts - Collect facts from remote devices running Juniper Junos
New in version 2.1.
Synopsis
- Collects fact information from a remote device running the Junos operating system. By default, the module will collect basic fact information from the device to be included with the hostvars. Additional fact information can be collected based on the configured set of arguments.
Requirements (on host that executes module)
- ncclient (>=v0.5.2)
Options
parameter | required | default | choices | comments | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config_format (added in 2.3)
| no | text |
| The config_format argument specifies the format of the configuration when serializing output from the device. This argument is applicable only when config value is present in gather_subset. The config_format should be supported by the junos version running on device. | |||||||||||||||||||||||||||||||||||
gather_subset (added in 2.3)
| no | !config | When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, hardware, config, and interfaces. Can specify a list of values to include a larger subset. Values can also be used with an initial ! to specify that a specific subset should not be collected. To maintain backward compatbility old style facts can be retrieved using all value, this reqires junos-eznc to be installed as a prerequisite. | ||||||||||||||||||||||||||||||||||||
provider | no | A dict object containing connection details. |
|||||||||||||||||||||||||||||||||||||
|
Examples
- name: collect default set of facts junos_facts: - name: collect default set of facts and configuration junos_facts: gather_subset: config
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
ansible_facts | Returns the facts collect from the device | always | dict |
Notes
Note
- Ensure config_format used to retrieve configuration from device is supported by junos version running on device.
- This module requires the netconf system service be enabled on the remote device being managed.
- Tested against vSRX JUNOS version 15.1X49-D15.4, vqfx-10000 JUNOS Version 15.1X53-D60.4.
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance Info
For more information about Red Hat’s this support of this module, please refer to this knowledge base article<https://access.redhat.com/articles/rhel-top-support-policies>
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/junos_facts_module.html