fortinet / fortinet.fortios / 1.1.7 / module / fortios_system_automation_action Action for automation stitches in Fortinet's FortiOS and FortiGate. | "added in version" 2.9 of fortinet.fortios" Authors: Link Zheng (@chillancezen), Jie Xue (@JieX19), Hongbin Lu (@fgtdev-hblu), Frank Shen (@frankshen01), Miguel Angel Munoz (@mamunozgonzalez), Nicolas Thomas (@thomnico) preview | supported by communityfortinet.fortios.fortios_system_automation_action (1.1.7) — module
Install with ansible-galaxy collection install fortinet.fortios:==1.1.7
collections: - name: fortinet.fortios version: 1.1.7
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.4.0
- hosts: fortigates collections: - fortinet.fortios connection: httpapi vars: vdom: "root" ansible_httpapi_use_ssl: yes ansible_httpapi_validate_certs: no ansible_httpapi_port: 443 tasks: - name: Action for automation stitches. fortios_system_automation_action: vdom: "{{ vdom }}" state: "present" access_token: "<your_own_value>" system_automation_action: 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: "24" email_from: "<your_own_value>" email_subject: "<your_own_value>" email_to: - name: "default_name_28" 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>" message: "<your_own_value>" method: "post" minimum_interval: "38" name: "default_name_39" port: "40" protocol: "http" required: "enable" script: "<your_own_value>" sdn_connector: - name: "default_name_45 (source system.sdn-connector.name)" security_tag: "<your_own_value>" tls_certificate: "<your_own_value> (source certificate.local.name)" uri: "<your_own_value>"
vdom: default: root description: - 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. type: str state: choices: - present - absent description: - Indicates whether to create or remove the object. required: true type: str access_token: description: - Token-based authentication. Generated from GUI of Fortigate. required: false type: str system_automation_action: default: null description: - Action for automation stitches. suboptions: action_type: choices: - email - ios-notification - alert - disable-ssid - quarantine - quarantine-forticlient - quarantine-nsx - ban-ip - aws-lambda - azure-function - google-cloud-function - alicloud-function - webhook - cli-script - slack-notification description: - Action type. type: str alicloud_access_key_id: description: - AliCloud AccessKey ID. type: str alicloud_access_key_secret: description: - AliCloud AccessKey secret. type: str alicloud_account_id: description: - AliCloud account ID. type: str alicloud_function: description: - AliCloud function name. type: str alicloud_function_authorization: choices: - anonymous - function description: - AliCloud function authorization type. type: str alicloud_function_domain: description: - AliCloud function domain. type: str alicloud_region: description: - AliCloud region. type: str alicloud_service: description: - AliCloud service name. type: str alicloud_version: description: - AliCloud version. type: str aws_api_id: description: - AWS API Gateway ID. type: str aws_api_key: description: - AWS API Gateway API key. type: str aws_api_path: description: - AWS API Gateway path. type: str aws_api_stage: description: - AWS API Gateway deployment stage name. type: str aws_domain: description: - AWS domain. type: str aws_region: description: - AWS region. type: str azure_api_key: description: - Azure function API key. type: str azure_app: description: - Azure function application name. type: str azure_domain: description: - Azure function domain. type: str azure_function: description: - Azure function name. type: str azure_function_authorization: choices: - anonymous - function - admin description: - Azure function authorization level. type: str delay: description: - Delay before execution (in seconds). type: int email_from: description: - Email sender name. type: str email_subject: description: - Email subject. type: str email_to: description: - Email addresses. suboptions: name: description: - Email address. required: true type: str type: list gcp_function: description: - Google Cloud function name. type: str gcp_function_domain: description: - Google Cloud function domain. type: str gcp_function_region: description: - Google Cloud function region. type: str gcp_project: description: - Google Cloud Platform project name. type: str headers: description: - Request headers. suboptions: header: description: - Request header. required: true type: str type: list http_body: description: - Request body (if necessary). Should be serialized json string. type: str message: description: - Message content. type: str method: choices: - post - put - get - patch - delete description: - Request method (POST, PUT, GET, PATCH or DELETE). type: str minimum_interval: description: - Limit execution to no more than once in this interval (in seconds). type: int name: description: - Name. required: true type: str port: description: - Protocol port. type: int protocol: choices: - http - https description: - Request protocol. type: str required: choices: - enable - disable description: - Required in action chain. type: str script: description: - CLI script. type: str sdn_connector: description: - NSX SDN connector names. suboptions: name: description: - SDN connector name. Source system.sdn-connector.name. required: true type: str type: list security_tag: description: - NSX security tag. type: str tls_certificate: description: - Custom TLS certificate for API request. Source certificate.local.name. type: str uri: description: - Request API URI. type: str type: dict
build: description: Build number of the fortigate image returned: always sample: '1547' type: str http_method: description: Last method used to provision the content into FortiGate returned: always sample: PUT type: str http_status: description: Last result given by FortiGate on last operation applied returned: always sample: '200' type: str mkey: description: Master key (id) used in the last call to FortiGate returned: success sample: id type: str name: description: Name of the table used to fulfill the request returned: always sample: urlfilter type: str path: description: Path of the table used to fulfill the request returned: always sample: webfilter type: str revision: description: Internal revision number returned: always sample: 17.0.2.10658 type: str serial: description: Serial number of the unit returned: always sample: FGVMEVYYQT3AB5352 type: str status: description: Indication of the operation's result returned: always sample: success type: str vdom: description: Virtual domain used returned: always sample: root type: str version: description: Version of the FortiGate returned: always sample: v5.6.3 type: str