ansible / ansible.builtin / v2.9.25 / module / fortios_facts Get facts about fortios devices. | "added in version" 2.9 of ansible.builtin" Authors: Don Yao (@fortinetps), Miguel Angel Munoz (@mamunozgonzalez), Nicolas Thomas (@thomnico) preview | supported by communityansible.builtin.fortios_facts (v2.9.25) — module
pip
Install with pip install ansible==2.9.25
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.
- 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'
host: description: - FortiOS or FortiGate IP address. required: false type: str vdom: default: root description: - Virtual domain, among those defined previously. A vdom is a virtual instance of the FortiGate that can be configured and used as a different unit. required: false type: str https: default: true description: - Indicates if the requests towards FortiGate must use HTTPS protocol. required: false type: bool password: default: '' description: - FortiOS or FortiGate password. required: false type: str username: description: - FortiOS or FortiGate username. required: false type: str ssl_verify: default: false description: - Ensures FortiGate certificate must be verified by a proper CA. required: false type: bool gather_subset: description: - When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include system_current-admins_select, system_firmware_select, system_fortimanager_status, system_ha-checksums_select, system_interface_select, system_status_select and system_time_select elements: dict required: true suboptions: fact: description: - Name of the facts to gather required: true type: str filters: description: - Filters apply when gathering facts elements: dict required: false type: list type: list
ansible_facts: description: The list of fact subsets collected from the device returned: always type: dict build: description: Build number of the fortigate image returned: always sample: '1547' type: str http_method: description: Last method used to provision the content into FortiGate returned: always sample: GET type: str name: description: Name of the table used to fulfill the request returned: always sample: firmware type: str path: description: Path of the table used to fulfill the request returned: always sample: system type: str revision: description: Internal revision number returned: always sample: 17.0.2.10658 type: str serial: description: Serial number of the unit returned: always sample: FGVMEVYYQT3AB5352 type: str status: description: Indication of the operation's result returned: always sample: success type: str vdom: description: Virtual domain used returned: always sample: root type: str version: description: Version of the FortiGate returned: always sample: v5.6.3 type: str