fmgd_system_automationtrigger – Trigger for automation stitches.
Added in version 1.0.0.
Synopsis
This module is able to configure a FortiManager device.
Examples include all parameters and values need to be adjusted to data sources before usage.
Tested with FortiManager v7.x.
Requirements
The below requirements are needed on the host that executes this module.
ansible-core>=2.16.0
FortiManager Version Compatibility
Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest
Parameters
- access_token -The token to access FortiManager without using username and password. type: str required: false
- bypass_validation - Only set to True when module schema diffs with FortiManager API structure, module continues to execute without validating parameters. type: bool required: false default: False
- enable_log - Enable/Disable logging for task. type: bool required: false default: False
- forticloud_access_token - Access token of forticloud managed API users, this option is available with FortiManager later than 6.4.0. type: str required: false
- proposed_method - The overridden method for the underlying Json RPC request. type: str required: false choices: set, update, add
- rc_succeeded - The rc codes list with which the conditions to succeed will be overriden. type: list required: false
- rc_failed - The rc codes list with which the conditions to fail will be overriden. type: list required: false
- state - The directive to create, update or delete an object type: str required: true choices: present, absent
- workspace_locking_adom - Acquire the workspace lock if FortiManager is running in workspace mode. type: str required: false choices: global, custom adom including root
- workspace_locking_timeout - The maximum time in seconds to wait for other users to release workspace lock. type: integer required: false default: 300
- device - The parameter in requested url type: str required: true
- system_automationtrigger - Trigger for automation stitches. type: dict
- description Description. type: str more...
- event_type (Alias name: event-type) Event type. type: str choices: [ioc, event-log, reboot, low-memory, high-cpu, license-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, local-cert-near-expiry, stitch] more...
- fabric_event_name (Alias name: fabric-event-name) Fabric connector event handler name. type: str more...
- fabric_event_severity (Alias name: fabric-event-severity) Fabric connector event severity. type: str more...
- faz_event_name (Alias name: faz-event-name) Fortianalyzer event handler name. type: str more...
- faz_event_severity (Alias name: faz-event-severity) Fortianalyzer event severity. type: str more...
- faz_event_tags (Alias name: faz-event-tags) Fortianalyzer event tags. type: str more...
- fields Fields. type: list more...
- license_type (Alias name: 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 more...
- name Name. type: str more...
- report_type (Alias name: report-type) Security rating report. type: str choices: [posture, coverage, optimization, any, OptimizationReport, PostureReport, CoverageReport] more...
- serial Fabric connector serial number. type: str more...
- trigger_datetime (Alias name: trigger-datetime) Trigger date and time (yyyy-mm-dd hh:mm:ss). type: str more...
- trigger_day (Alias name: trigger-day) Day within a month to trigger. type: int more...
- trigger_frequency (Alias name: trigger-frequency) Scheduled trigger frequency (default = daily). type: str choices: [daily, weekly, once, monthly, hourly] more...
- trigger_hour (Alias name: trigger-hour) Hour of the day on which to trigger (0 - 23, default = 1). type: int more...
- trigger_minute (Alias name: trigger-minute) Minute of the hour on which to trigger (0 - 59, default = 0). type: int more...
- trigger_type (Alias name: trigger-type) Trigger type. type: str choices: [event-based, scheduled] more...
- trigger_weekday (Alias name: 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 more...
- ioc_level (Alias name: ioc-level) Ioc threat level. type: str choices: [high, medium] more...
- stitch_name (Alias name: stitch-name) Triggering stitch name. type: list more...
Notes
Note
Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work.
To create or update an object, use state: present directive.
To delete an object, use state: absent directive
Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded
Examples
- name: Example playbook (generated based on argument schema)
hosts: fortimanagers
connection: httpapi
gather_facts: false
vars:
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: false
ansible_httpapi_port: 443
tasks:
- name: Trigger for automation stitches.
fortinet.fmgdevice.fmgd_system_automationtrigger:
# bypass_validation: false
# workspace_locking_adom: <global or your adom name>
# workspace_locking_timeout: 300
# rc_succeeded: [0, -2, -3, ...]
# rc_failed: [-2, -3, ...]
device: <your own value>
state: present # <value in [present, absent]>
system_automationtrigger:
name: "your value" # Required variable, string
# description: <string>
# event_type: <value in [ioc, event-log, reboot, ...]>
# fabric_event_name: <string>
# fabric_event_severity: <string>
# faz_event_name: <string>
# faz_event_severity: <string>
# faz_event_tags: <string>
# fields:
# - id: <integer>
# name: <string>
# value: <string>
# license_type: <value in [forticare-support, fortiguard-webfilter, fortiguard-antispam, ...]>
# logid: <list or integer>
# report_type: <value in [posture, coverage, optimization, ...]>
# serial: <string>
# trigger_datetime: <string>
# trigger_day: <integer>
# trigger_frequency: <value in [daily, weekly, once, ...]>
# trigger_hour: <integer>
# trigger_minute: <integer>
# trigger_type: <value in [event-based, scheduled]>
# trigger_weekday: <value in [sunday, monday, tuesday, ...]>
# vdom: <list or string>
# ioc_level: <value in [high, medium]>
# stitch_name: <list or string>
Return Values
Common return values are documented: https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values, the following are the fields unique to this module:
- meta - The result of the request.returned: always type: dict
- request_url - The full url requested. returned: always type: str sample: /sys/login/user
- response_code - The status of api request. returned: always type: int sample: 0
- response_data - The data body of the api response. returned: optional type: list or dict
- response_message - The descriptive message of the api response. returned: always type: str sample: OK
- system_information - The information of the target system. returned: always type: dict
- rc - The status the request. returned: always type: int sample: 0
- version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least one parameter not supported by the current FortiManager version type: list
Status
This module is not guaranteed to have a backwards compatible interface.