fortios_system_automation_trigger – Trigger for automation stitches in Fortinet’s FortiOS and FortiGate.

New in version 2.0.0.


  • This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify system feature and automation_trigger category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0


The below requirements are needed on the host that executes this module.

  • ansible>=2.14


Using member operation to add an element to an existing object.

FortiOS Version Compatibility

Supported Version Ranges
fortios_system_automation_trigger v6.0.0 -> latest


  • access_token - Token-based authentication. Generated from GUI of Fortigate. type: str required: false
  • enable_log - Enable/Disable logging for task. type: bool required: false default: False
  • vdom - 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 default: root
  • member_path - Member attribute path to operate on. type: str
  • member_state - Add or delete a member under specified attribute path. type: str choices: present, absent
  • state - Indicates whether to create or remove the object. type: str required: true choices: present, absent
  • system_automation_trigger - Trigger for automation stitches. type: dict more...
    • description - Description. type: str more...
    • event_type - Event type. type: str choices: ioc, event-log, reboot, low-memory, high-cpu, license-near-expiry, local-cert-near-expiry, ha-failover, config-change, security-rating-summary, virus-ips-db-updated, faz-event, incoming-webhook, fabric-event, ips-logs, anomaly-logs, virus-logs, ssh-logs, webfilter-violation, traffic-violation more...
    • fabric_event_name - Fabric connector event handler name. type: str more...
    • fabric_event_severity - Fabric connector event severity. type: str more...
    • faz_event_name - FortiAnalyzer event handler name. type: str more...
    • faz_event_severity - FortiAnalyzer event severity. type: str more...
    • faz_event_tags - FortiAnalyzer event tags. type: str more...
    • fields - Customized trigger field settings. type: list member_path: fields:id more...
      • id - Entry ID. see Notes. type: int required: true more...
      • name - Name. type: str more...
      • value - Value. type: str more...
    • ioc_level - IOC threat level. type: str choices: medium, high more...
    • license_type - License type. type: str choices: forticare-support, fortiguard-webfilter, fortiguard-antispam, fortiguard-antivirus, fortiguard-ips, fortiguard-management, forticloud, any more...
    • logid - Log IDs to trigger event. type: list member_path: logid:id more...
      • id - Log ID. see Notes. type: int required: true more...
    • name - Name. type: str required: true more...
    • report_type - Security Rating report. type: str choices: posture, coverage, optimization, any, PostureReport, CoverageReport, OptimizationReport more...
    • serial - Fabric connector serial number. type: str more...
    • trigger_datetime - Trigger date and time (YYYY-MM-DD HH:MM:SS). type: str more...
    • trigger_day - Day within a month to trigger. type: int more...
    • trigger_frequency - Scheduled trigger frequency . type: str choices: hourly, daily, weekly, monthly, once more...
    • trigger_hour - Hour of the day on which to trigger (0 - 23). type: int more...
    • trigger_minute - Minute of the hour on which to trigger (0 - 59). type: int more...
    • trigger_type - Trigger type. type: str choices: event-based, scheduled more...
    • trigger_weekday - Day of week for trigger. type: str choices: sunday, monday, tuesday, wednesday, thursday, friday, saturday more...
    • vdom - Virtual domain(s) that this trigger is valid for. type: list member_path: vdom:name more...
      • name - Virtual domain name. Source type: str required: true more...



  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks


- name: Trigger for automation stitches.
      vdom: "{{ vdom }}"
      state: "present"
      access_token: "<your_own_value>"
          description: "<your_own_value>"
          event_type: "ioc"
          fabric_event_name: "<your_own_value>"
          fabric_event_severity: "<your_own_value>"
          faz_event_name: "<your_own_value>"
          faz_event_severity: "<your_own_value>"
          faz_event_tags: "<your_own_value>"
                  id: "11"
                  name: "default_name_12"
                  value: "<your_own_value>"
          ioc_level: "medium"
          license_type: "forticare-support"
                  id: "17"
          name: "default_name_18"
          report_type: "posture"
          serial: "<your_own_value>"
          trigger_datetime: "<your_own_value>"
          trigger_day: "1"
          trigger_frequency: "hourly"
          trigger_hour: "0"
          trigger_minute: "0"
          trigger_type: "event-based"
          trigger_weekday: "sunday"
                  name: "default_name_29 (source"

Return Values

Common return values are documented:, the following are the fields unique to this module:

  • build - Build number of the fortigate image returned: always type: str sample: 1547
  • http_method - Last method used to provision the content into FortiGate returned: always type: str sample: PUT
  • http_status - Last result given by FortiGate on last operation applied returned: always type: str sample: 200
  • mkey - Master key (id) used in the last call to FortiGate returned: success type: str sample: id
  • name - Name of the table used to fulfill the request returned: always type: str sample: urlfilter
  • path - Path of the table used to fulfill the request returned: always type: str sample: webfilter
  • revision - Internal revision number returned: always type: str sample:
  • serial - Serial number of the unit returned: always type: str sample: FGVMEVYYQT3AB5352
  • status - Indication of the operation's result returned: always type: str sample: success
  • vdom - Virtual domain used returned: always type: str sample: root
  • version - Version of the FortiGate returned: always type: str sample: v5.6.3


  • This module is not guaranteed to have a backwards compatible interface.


  • Link Zheng (@chillancezen)

  • Jie Xue (@JieX19)

  • Hongbin Lu (@fgtdev-hblu)

  • Frank Shen (@frankshen01)

  • Miguel Angel Munoz (@mamunozgonzalez)

  • Nicolas Thomas (@thomnico)


If you notice any issues in this documentation, you can create a pull request to improve it.