fortinet.fortios.fortios_system_automation_action module – Action for automation stitches in Fortinet’s FortiOS and FortiGate.
Note
This module is part of the fortinet.fortios collection (version 2.3.8).
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 fortinet.fortios
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: fortinet.fortios.fortios_system_automation_action
.
New in fortinet.fortios 2.0.0
Synopsis
This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify system feature and automation_action category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0
Requirements
The below requirements are needed on the host that executes this module.
ansible>=2.15
Parameters
Parameter |
Comments |
---|---|
Token-based authentication. Generated from GUI of Fortigate. |
|
Enable/Disable logging for task. Choices:
|
|
Member attribute path to operate on. Delimited by a slash character if there are more than one attribute. Parameter marked with member_path is legitimate for doing member operation. |
|
Add or delete a member under specified attribute path. When member_state is specified, the state option is ignored. Choices:
|
|
Indicates whether to create or remove the object. Choices:
|
|
Action for automation stitches. |
|
Access profile for CLI script action to access FortiGate features. Source system.accprofile.name. |
|
Action type. Choices:
|
|
AliCloud AccessKey ID. |
|
AliCloud AccessKey secret. |
|
AliCloud account ID. |
|
AliCloud function name. |
|
AliCloud function authorization type. Choices:
|
|
AliCloud function domain. |
|
AliCloud region. |
|
AliCloud service name. |
|
AliCloud version. |
|
AWS API Gateway ID. |
|
AWS API Gateway API key. |
|
AWS API Gateway path. |
|
AWS API Gateway deployment stage name. |
|
AWS domain. |
|
AWS region. |
|
Azure function API key. |
|
Azure function application name. |
|
Azure function domain. |
|
Azure function name. |
|
Azure function authorization level. Choices:
|
|
Delay before execution (in seconds). |
|
Description. |
|
Email body. |
|
Email sender name. |
|
Email subject. |
|
Email addresses. |
|
Email address. |
|
Enable/disable execution of CLI script on all or only one FortiGate unit in the Security Fabric. Choices:
|
|
Enable/disable use of your FortiCare email address as the email-to address. Choices:
|
|
Message content. |
|
Google Cloud function name. |
|
Google Cloud function domain. |
|
Google Cloud function region. |
|
Google Cloud Platform project name. |
|
Request headers. |
|
Request header. |
|
Request body (if necessary). Should be serialized json string. |
|
Request headers. |
|
Entry ID. see <a href=’#notes’>Notes</a>. |
|
Request header key. |
|
Request header value. |
|
Message type. Choices:
|
|
Request method (POST, PUT, GET, PATCH or DELETE). Choices:
|
|
Limit execution to no more than once in this interval (in seconds). |
|
Name. |
|
Number of megabytes to limit script output to (1 - 1024). |
|
Protocol port. |
|
Request protocol. Choices:
|
|
Enable/disable replacement message. Choices:
|
|
Replacement message group. Source system.replacemsg-group.name. |
|
Required in action chain. Choices:
|
|
CLI script. |
|
NSX SDN connector names. |
|
SDN connector name. Source system.sdn-connector.name. |
|
NSX security tag. |
|
System action type. Choices:
|
|
Maximum running time for this script in seconds (0 = no timeout). |
|
Custom TLS certificate for API request. Source certificate.local.name. |
|
Request API URI. |
|
Enable/disable verification of the remote host certificate. Choices:
|
|
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. Default: |
Notes
Note
Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
The module supports check_mode.
Examples
- name: Action for automation stitches.
fortinet.fortios.fortios_system_automation_action:
vdom: "{{ vdom }}"
state: "present"
access_token: "<your_own_value>"
system_automation_action:
accprofile: "<your_own_value> (source system.accprofile.name)"
action_type: "email"
alicloud_access_key_id: "<your_own_value>"
alicloud_access_key_secret: "<your_own_value>"
alicloud_account_id: "<your_own_value>"
alicloud_function: "<your_own_value>"
alicloud_function_authorization: "anonymous"
alicloud_function_domain: "<your_own_value>"
alicloud_region: "<your_own_value>"
alicloud_service: "<your_own_value>"
alicloud_version: "<your_own_value>"
aws_api_id: "<your_own_value>"
aws_api_key: "<your_own_value>"
aws_api_path: "<your_own_value>"
aws_api_stage: "<your_own_value>"
aws_domain: "<your_own_value>"
aws_region: "<your_own_value>"
azure_api_key: "<your_own_value>"
azure_app: "<your_own_value>"
azure_domain: "<your_own_value>"
azure_function: "<your_own_value>"
azure_function_authorization: "anonymous"
delay: "0"
description: "<your_own_value>"
email_body: "<your_own_value>"
email_from: "<your_own_value>"
email_subject: "<your_own_value>"
email_to:
-
name: "default_name_31"
execute_security_fabric: "enable"
forticare_email: "enable"
fos_message: "<your_own_value>"
gcp_function: "<your_own_value>"
gcp_function_domain: "<your_own_value>"
gcp_function_region: "<your_own_value>"
gcp_project: "<your_own_value>"
headers:
-
header: "<your_own_value>"
http_body: "<your_own_value>"
http_headers:
-
id: "43"
key: "<your_own_value>"
value: "<your_own_value>"
message_type: "text"
method: "post"
minimum_interval: "0"
name: "default_name_49"
output_size: "10"
port: "0"
protocol: "http"
replacement_message: "enable"
replacemsg_group: "<your_own_value> (source system.replacemsg-group.name)"
required: "enable"
script: "<your_own_value>"
sdn_connector:
-
name: "default_name_58 (source system.sdn-connector.name)"
security_tag: "<your_own_value>"
system_action: "reboot"
timeout: "0"
tls_certificate: "<your_own_value> (source certificate.local.name)"
uri: "<your_own_value>"
verify_host_cert: "enable"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Build number of the fortigate image Returned: always Sample: |
|
Last method used to provision the content into FortiGate Returned: always Sample: |
|
Last result given by FortiGate on last operation applied Returned: always Sample: |
|
Master key (id) used in the last call to FortiGate Returned: success Sample: |
|
Name of the table used to fulfill the request Returned: always Sample: |
|
Path of the table used to fulfill the request Returned: always Sample: |
|
Internal revision number Returned: always Sample: |
|
Serial number of the unit Returned: always Sample: |
|
Indication of the operation’s result Returned: always Sample: |
|
Virtual domain used Returned: always Sample: |
|
Version of the FortiGate Returned: always Sample: |