community.network.fmgr_query – Query FortiManager data objects for use in Ansible workflows.¶
Note
This plugin is part of the community.network collection (version 1.3.2).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.fmgr_query
.
Synopsis¶
Provides information on data objects within FortiManager so that playbooks can perform conditionals.
Parameters¶
Notes¶
Note
Full Documentation at https://ftnt-ansible-docs.readthedocs.io/en/latest/.
Examples¶
- name: QUERY FORTIGATE DEVICE BY IP
community.network.fmgr_query:
object: "device"
adom: "ansible"
device_ip: "10.7.220.41"
- name: QUERY FORTIGATE DEVICE BY SERIAL
community.network.fmgr_query:
adom: "ansible"
object: "device"
device_serial: "FGVM000000117992"
- name: QUERY FORTIGATE DEVICE BY FRIENDLY NAME
community.network.fmgr_query:
adom: "ansible"
object: "device"
device_unique_name: "ansible-fgt01"
- name: VERIFY CLUSTER MEMBERS AND STATUS
community.network.fmgr_query:
adom: "ansible"
object: "cluster_nodes"
device_unique_name: "fgt-cluster01"
nodes: ["ansible-fgt01", "ansible-fgt02", "ansible-fgt03"]
- name: GET STATUS OF TASK ID
community.network.fmgr_query:
adom: "ansible"
object: "task"
task_id: "3"
- name: USE CUSTOM TYPE TO QUERY AVAILABLE SCRIPTS
community.network.fmgr_query:
adom: "ansible"
object: "custom"
custom_endpoint: "/dvmdb/adom/ansible/script"
custom_dict: { "type": "cli" }
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
api_result
string
|
always |
full API response, includes status code and message
|
Authors¶
Luke Weighall (@lweighall)