Note
This plugin is part of the fortinet.fortimanager collection (version 2.0.1).
To install it use: ansible-galaxy collection install fortinet.fortimanager
.
To use it in a playbook, specify: fortinet.fortimanager.fmgr_generic
.
New in version 2.10: of fortinet.fortimanager
Parameter | Choices/Defaults | Comments |
---|---|---|
json string | the raw json-formatted payload to send to fortimanager | |
method string | the method of the json-rpc it must be in [get, add, set, update, delete, move, clone, exec] | |
params string | the parameter collection. |
Note
- hosts: fortimanager01 connection: httpapi vars: adom: "root" ansible_httpapi_use_ssl: True ansible_httpapi_validate_certs: False ansible_httpapi_port: 443 tasks: - name: 'login a user' fmgr_generic: method: 'exec' params: - url: 'sys/login/user' data: - user: 'APIUser' passwd: 'Fortinet1!e' - name: 'login another user' fmgr_generic: json: | { "method":"exec", "params":[ { "url":"sys/login/user", "data":[ { "user":"APIUser", "passwd":"Fortinet1!" } ] } ] }
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 |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/fortinet/fortimanager/fmgr_generic_module.html