community / community.fortios / 1.0.0 / module / fmgr_script Add/Edit/Delete and execute scripts Authors: Andrew Welsh (@Ghilli3)community.fortios.fmgr_script (1.0.0) — module
Install with ansible-galaxy collection install community.fortios:==1.0.0
collections: - name: community.fortios version: 1.0.0
Create/edit/delete scripts and execute the scripts on the FortiManager using jsonrpc API
- 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"
adom: description: - The administrative domain (admon) the configuration belongs to required: true mode: choices: - add - delete - execute - set default: add description: - The desired mode of the specified object. Execute will run the script. required: false vdom: description: - The virtual domain (vdom) the configuration belongs to script_name: description: - The name of the script. required: true script_type: description: - The type of script (CLI or TCL). required: false script_scope: description: - (datasource) The devices that the script will run on, can have both device member and device group member. required: false script_target: description: - The target of the script to be run. required: false script_content: description: - The script content that will be executed. required: false script_package: description: - (datasource) Policy package object to run the script against required: false script_description: description: - The description of the script. required: false
api_result: description: full API response, includes status code and message returned: always type: str