community.fortios.fmgr_script module – Add/Edit/Delete and execute scripts
Note
This module is part of the community.fortios collection (version 1.0.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.fortios
.
To use it in a playbook, specify: community.fortios.fmgr_script
.
Parameters
Parameter |
Comments |
---|---|
The administrative domain (admon) the configuration belongs to |
|
The desired mode of the specified object. Execute will run the script. Choices:
|
|
The script content that will be executed. |
|
The description of the script. |
|
The name of the script. |
|
(datasource) Policy package object to run the script against |
|
(datasource) The devices that the script will run on, can have both device member and device group member. |
|
The target of the script to be run. |
|
The type of script (CLI or TCL). |
|
The virtual domain (vdom) the configuration belongs to |
Notes
Note
Full Documentation at https://ftnt-ansible-docs.readthedocs.io/en/latest/.
Examples
- name: CREATE SCRIPT
community.fortios.fmgr_script:
adom: "root"
script_name: "TestScript"
script_type: "cli"
script_target: "remote_device"
script_description: "Create by Ansible"
script_content: "get system status"
- name: EXECUTE SCRIPT
community.fortios.fmgr_script:
adom: "root"
script_name: "TestScript"
mode: "execute"
script_scope: "FGT1,FGT2"
- name: DELETE SCRIPT
community.fortios.fmgr_script:
adom: "root"
script_name: "TestScript"
mode: "delete"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
full API response, includes status code and message Returned: always |
Authors
Andrew Welsh (@Ghilli3)