fortios_facts – Get facts about fortios devices¶
New in version 2.9.
Synopsis¶
Collects facts from network devices running the fortios operating system. This module places the facts gathered in the fact tree keyed by the respective resource name. This facts module will only collect those facts which user specified in playbook.
Requirements¶
The below requirements are needed on the host that executes this module.
fortiosapi>=0.9.8
Parameters¶
Notes¶
Note
Support both legacy mode (local_action) and httpapi
Legacy mode run as a local_action in your playbook, requires fortiosapi library developed by Fortinet
httpapi mode is the new recommend way for network modules
Examples¶
- hosts: localhost
vars:
host: "192.168.122.40"
username: "admin"
password: ""
vdom: "root"
ssl_verify: "False"
tasks:
- name: gather basic system status facts
fortios_facts:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
gather_subset:
- fact: 'system_status_select'
- name: gather all physical interfaces status facts
fortios_facts:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
gather_subset:
- fact: 'system_interface_select'
- name: gather gather all physical and vlan interfaces status facts
fortios_facts:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
gather_subset:
- fact: 'system_interface_select'
filters:
- include_vlan: true
- name: gather basic system info and physical interface port3 status facts
fortios_facts:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
vdom: "{{ vdom }}"
gather_subset:
- fact: 'system_status_select'
- fact: 'system_interface_select'
filters:
- interface_name: 'port3'
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Don Yao (@fortinetps)
Miguel Angel Munoz (@mamunozgonzalez)
Nicolas Thomas (@thomnico)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.