fortios_system_csf – Add this FortiGate to a Security Fabric or set up a new Security Fabric on this FortiGate in Fortinet’s FortiOS and FortiGate.

New in version 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 csf 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

Tips

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

FortiOS Version Compatibility

Supported Version Ranges: v6.0.0 -> 7.4.3

Parameters

  • 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
  • system_csf - Add this FortiGate to a Security Fabric or set up a new Security Fabric on this FortiGate. type: dict more...
    • accept_auth_by_cert - Accept connections with unknown certificates and ask admin for approval. type: str choices: disable, enable more...
    • authorization_request_type - Authorization request type. type: str choices: serial, certificate more...
    • certificate - Certificate. Source certificate.local.name. type: str more...
    • configuration_sync - Configuration sync mode. type: str choices: default, local more...
    • downstream_access - Enable/disable downstream device access to this device"s configuration and data. type: str choices: enable, disable more...
    • downstream_accprofile - Default access profile for requests from downstream devices. Source system.accprofile.name. type: str more...
    • fabric_connector - Fabric connector configuration. type: list member_path: fabric_connector:serial more...
      • accprofile - Override access profile. Source system.accprofile.name. type: str more...
      • configuration_write_access - Enable/disable downstream device write access to configuration. type: str choices: enable, disable more...
      • serial - Serial. type: str required: true more...
      • vdom - Virtual domains that the connector has access to. If none are set, the connector will only have access to the VDOM that it joins the Security Fabric through. type: list member_path: fabric_connector:serial/vdom:name more...
        • name - Virtual domain name. Source system.vdom.name. type: str required: true more...
    • fabric_device - Fabric device configuration. type: list member_path: fabric_device:name more...
      • access_token - Device access token. type: str more...
      • device_ip - Device IP. type: str more...
      • device_type - Device type. type: str choices: fortimail more...
      • https_port - HTTPS port for fabric device. type: int more...
      • login - Device login name. type: str more...
      • name - Device name. type: str required: true more...
      • password - Device login password. type: str more...
    • fabric_object_unification - Fabric CMDB Object Unification. type: str choices: default, local more...
    • fabric_workers - Number of worker processes for Security Fabric daemon. type: int more...
    • file_mgmt - Enable/disable Security Fabric daemon file management. type: str choices: enable, disable more...
    • file_quota - Maximum amount of memory that can be used by the daemon files (in bytes). type: int more...
    • file_quota_warning - Warn when the set percentage of quota has been used. type: int more...
    • fixed_key - Auto-generated fixed key used when this device is the root. (Will automatically be generated if not set.) type: str more...
    • forticloud_account_enforcement - Fabric FortiCloud account unification. type: str choices: enable, disable more...
    • group_name - Security Fabric group name. All FortiGates in a Security Fabric must have the same group name. type: str more...
    • group_password - Security Fabric group password. All FortiGates in a Security Fabric must have the same group password. type: str more...
    • log_unification - Enable/disable broadcast of discovery messages for log unification. type: str choices: disable, enable more...
    • management_ip - Management IP address of this FortiGate. Used to log into this FortiGate from another FortiGate in the Security Fabric. type: str more...
    • management_port - Overriding port for management connection (Overrides admin port). type: int more...
    • saml_configuration_sync - SAML setting configuration synchronization. type: str choices: default, local more...
    • status - Enable/disable Security Fabric. type: str choices: enable, disable more...
    • trusted_list - Pre-authorized and blocked security fabric nodes. type: list member_path: trusted_list:name more...
      • action - Security fabric authorization action. type: str choices: accept, deny more...
      • authorization_type - Authorization type. type: str choices: serial, certificate more...
      • certificate - Certificate. type: str more...
      • downstream_authorization - Trust authorizations by this node"s administrator. type: str choices: enable, disable more...
      • ha_members - HA members. type: list
      • index - Index of the downstream in tree. type: int more...
      • name - Name. type: str required: true more...
      • serial - Serial. type: str more...
    • uid - Unique ID of the current CSF node type: str more...
    • upstream - IP/FQDN of the FortiGate upstream from this FortiGate in the Security Fabric. type: str more...
    • upstream_ip - IP address of the FortiGate upstream from this FortiGate in the Security Fabric. type: str more...
    • upstream_port - The port number to use to communicate with the FortiGate upstream from this FortiGate in the Security Fabric . type: int more...

Notes

Note

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

Examples

- name: Add this FortiGate to a Security Fabric or set up a new Security Fabric on this FortiGate.
  fortinet.fortios.fortios_system_csf:
      vdom: "{{ vdom }}"
      system_csf:
          accept_auth_by_cert: "disable"
          authorization_request_type: "serial"
          certificate: "<your_own_value> (source certificate.local.name)"
          configuration_sync: "default"
          downstream_access: "enable"
          downstream_accprofile: "<your_own_value> (source system.accprofile.name)"
          fabric_connector:
              -
                  accprofile: "<your_own_value> (source system.accprofile.name)"
                  configuration_write_access: "enable"
                  serial: "<your_own_value>"
                  vdom:
                      -
                          name: "default_name_14 (source system.vdom.name)"
          fabric_device:
              -
                  access_token: "<your_own_value>"
                  device_ip: "<your_own_value>"
                  device_type: "fortimail"
                  https_port: "443"
                  login: "<your_own_value>"
                  name: "default_name_21"
                  password: "<your_own_value>"
          fabric_object_unification: "default"
          fabric_workers: "2"
          file_mgmt: "enable"
          file_quota: "0"
          file_quota_warning: "90"
          fixed_key: "<your_own_value>"
          forticloud_account_enforcement: "enable"
          group_name: "<your_own_value>"
          group_password: "<your_own_value>"
          log_unification: "disable"
          management_ip: "<your_own_value>"
          management_port: "32767"
          saml_configuration_sync: "default"
          status: "enable"
          trusted_list:
              -
                  action: "accept"
                  authorization_type: "serial"
                  certificate: "<your_own_value>"
                  downstream_authorization: "enable"
                  ha_members: "<your_own_value>"
                  index: "0"
                  name: "default_name_44"
                  serial: "<your_own_value>"
          uid: "<your_own_value>"
          upstream: "<your_own_value>"
          upstream_ip: "<your_own_value>"
          upstream_port: "8013"

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 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: 17.0.2.10658
  • 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

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)

  • Nicolas Thomas (@thomnico)

Hint

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