fortiswitch_alertemail_setting – Alertemail setting configuration in Fortinet’s FortiSwitch

New in version 1.0.0.

Synopsis

  • This module is able to configure a FortiSwitch device by allowing the user to set and modify alertemail feature and setting category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v7.0.0

Requirements

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

  • ansible>=2.14

FortiSW Version Compatibility


Supported Version Ranges
fortiswitch_alertemail_setting v7.0.0 -> latest

Parameters

  • enable_log - Enable/Disable logging for task. type: bool required: false default: False
  • 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
  • alertemail_setting - Alertemail setting configuration. type: dict
    • admin_login_logs - Admin-login-logs. type: str choices: enable, disable
    • alert_interval - Set Alert alert interval in minutes. type: int
    • amc_interface_bypass_mode - Amc-interface-bypass-mode. type: str choices: enable, disable
    • antivirus_logs - Antivirus-logs. type: str choices: enable, disable
    • configuration_changes_logs - Configuration-changes-logs. type: str choices: enable, disable
    • critical_interval - Set Critical alert interval in minutes. type: int
    • debug_interval - Set Debug alert interval in minutes. type: int
    • email_interval - Interval between each email. type: int
    • emergency_interval - Set Emergency alert interval in minutes. type: int
    • error_interval - Set Error alert interval in minutes. type: int
    • FDS_license_expiring_days - Send alertemail before these days FortiGuard license expire (1-100). type: int
    • FDS_license_expiring_warning - FDS-license-expiring-warning. type: str choices: enable, disable
    • FDS_update_logs - FDS-update-logs. type: str choices: enable, disable
    • filter_mode - Filter mode. type: str choices: category, threshold
    • firewall_authentication_failure_logs - Firewall-authentication-failure-logs. type: str choices: enable, disable
    • fortiguard_log_quota_warning - Fortiguard-log-quota-warning. type: str choices: enable, disable
    • HA_logs - HA-logs. type: str choices: enable, disable
    • information_interval - Set Information alert interval in minutes. type: int
    • IPS_logs - IPS-logs. type: str choices: enable, disable
    • IPsec_errors_logs - IPsec-errors-logs. type: str choices: enable, disable
    • local_disk_usage - Send alertemail when disk usage exceeds this threshold (1-99). type: int
    • log_disk_usage_warning - Log-disk-usage-warning. type: str choices: enable, disable
    • mailto1 - Set destination email address 1. type: str
    • mailto2 - Set destination email address 2. type: str
    • mailto3 - Set destination email address 3. type: str
    • notification_interval - Set Notification alert interval in minutes. type: int
    • PPP_errors_logs - PPP-errors-logs. type: str choices: enable, disable
    • severity - The least severity level to log. type: str choices: emergency, alert, critical, error, warning, notification, information, debug
    • sslvpn_authentication_errors_logs - Sslvpn-authentication-errors-logs. type: str choices: enable, disable
    • username - Set email from address. type: str
    • violation_traffic_logs - Violation-traffic-logs. type: str choices: enable, disable
    • warning_interval - Set Warning alert interval in minutes. type: int
    • webfilter_logs - Webfilter-logs. type: str choices: enable, disable

Examples

- name: Alertemail setting configuration.
  fortinet.fortiswitch.fortiswitch_alertemail_setting:
      alertemail_setting:
          admin_login_logs: "enable"
          alert_interval: "4"
          amc_interface_bypass_mode: "enable"
          antivirus_logs: "enable"
          configuration_changes_logs: "enable"
          critical_interval: "8"
          debug_interval: "9"
          email_interval: "10"
          emergency_interval: "11"
          error_interval: "12"
          FDS_license_expiring_days: "13"
          FDS_license_expiring_warning: "enable"
          FDS_update_logs: "enable"
          filter_mode: "category"
          firewall_authentication_failure_logs: "enable"
          fortiguard_log_quota_warning: "enable"
          HA_logs: "enable"
          information_interval: "20"
          IPS_logs: "enable"
          IPsec_errors_logs: "enable"
          local_disk_usage: "23"
          log_disk_usage_warning: "enable"
          mailto1: "<your_own_value>"
          mailto2: "<your_own_value>"
          mailto3: "<your_own_value>"
          notification_interval: "28"
          PPP_errors_logs: "enable"
          severity: "emergency"
          sslvpn_authentication_errors_logs: "enable"
          username: "<your_own_value>"
          violation_traffic_logs: "enable"
          warning_interval: "34"
          webfilter_logs: "enable"

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:

  • build - Build number of the fortiSwitch image returned: always type: str sample: 1547
  • http_method - Last method used to provision the content into FortiSwitch returned: always type: str sample: PUT
  • http_status - Last result given by FortiSwitch on last operation applied returned: always type: str sample: 200
  • mkey - Master key (id) used in the last call to FortiSwitch 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
  • serial - Serial number of the unit returned: always type: str sample: FS1D243Z13000122
  • status - Indication of the operation's result returned: always type: str sample: success
  • version - Version of the FortiSwitch returned: always type: str sample: v7.0.0

Status

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

Authors

  • Link Zheng (@chillancezen)

  • Jie Xue (@JieX19)

  • Hongbin Lu (@fgtdev-hblu)

  • Frank Shen (@frankshen01)

  • Miguel Angel Munoz (@mamunozgonzalez)

Hint

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