fmgd_system_csf – Add this FortiGate to a Security Fabric or set up a new Security Fabric on this FortiGate.

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
  • 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_csf - Add this FortiGate to a Security Fabric or set up a new Security Fabric on this FortiGate. type: dict
    • accept_auth_by_cert (Alias name: accept-auth-by-cert) Accept connections with unknown certificates and ask admin for approval. type: str choices: [disable, enable] more...
    • authorization_request_type (Alias name: authorization-request-type) Authorization request type. type: str choices: [certificate, serial] more...
    • certificate Certificate. type: list more...
    • configuration_sync (Alias name: configuration-sync) Configuration sync mode. type: str choices: [default, local] more...
    • downstream_access (Alias name: downstream-access) Enable/disable downstream device access to this devices configuration and data. type: str choices: [disable, enable] more...
    • downstream_accprofile (Alias name: downstream-accprofile) Default access profile for requests from downstream devices. type: list more...
    • fabric_connector (Alias name: fabric-connector) Fabric connector. type: list more...
      • accprofile Override access profile. type: list more...
      • configuration_write_access (Alias name: configuration-write-access) Enable/disable downstream device write access to configuration. type: str choices: [disable, enable] more...
      • serial Serial. type: str more...
      • vdom Virtual domains that the connector has access to. type: list more...
    • fabric_object_unification (Alias name: fabric-object-unification) Fabric cmdb object unification. type: str choices: [default, local] more...
    • fabric_workers (Alias name: fabric-workers) Number of worker processes for security fabric daemon. type: int more...
    • file_mgmt (Alias name: file-mgmt) Enable/disable security fabric daemon file management. type: str choices: [disable, enable] more...
    • file_quota (Alias name: file-quota) Maximum amount of memory that can be used by the daemon files (in bytes). type: int more...
    • file_quota_warning (Alias name: file-quota-warning) Warn when the set percentage of quota has been used. type: int more...
    • fixed_key (Alias name: fixed-key) Auto-generated fixed key used when this device is the root. type: list more...
    • forticloud_account_enforcement (Alias name: forticloud-account-enforcement) Fabric forticloud account unification. type: str choices: [disable, enable] more...
    • group_name (Alias name: group-name) Security fabric group name. type: str more...
    • group_password (Alias name: group-password) Security fabric group password. type: list more...
    • log_unification (Alias name: log-unification) Enable/disable broadcast of discovery messages for log unification. type: str choices: [disable, enable] more...
    • saml_configuration_sync (Alias name: saml-configuration-sync) Saml setting configuration synchronization. type: str choices: [default, local] more...
    • source_ip (Alias name: source-ip) Source ip address for communication with the upstream fortigate. type: str more...
    • status Enable/disable security fabric. type: str choices: [disable, enable] more...
    • trusted_list (Alias name: trusted-list) Trusted list. type: list more...
      • action Security fabric authorization action. type: str choices: [deny, accept] more...
      • authorization_type (Alias name: authorization-type) Authorization type. type: str choices: [certificate, serial] more...
      • certificate Certificate. type: str more...
      • downstream_authorization (Alias name: downstream-authorization) Trust authorizations by this nodes administrator. type: str choices: [disable, enable] more...
      • ha_members (Alias name: ha-members) Ha members. type: list more...
      • index Index of the downstream in tree. type: int more...
      • name Name. type: str more...
      • serial Serial. type: str more...
      • guaranteed_seats (Alias name: guaranteed-seats) Guaranteed seats. type: int more...
      • preferred_seats (Alias name: preferred-seats) Preferred seats. type: int 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_interface (Alias name: upstream-interface) Specify outgoing interface to reach server. type: list more...
    • upstream_interface_select_method (Alias name: upstream-interface-select-method) Specify how to select outgoing interface to reach server. type: str choices: [auto, sdwan, specify] more...
    • upstream_port (Alias name: upstream-port) The port number to use to communicate with the fortigate upstream from this fortigate in the security fabric (default = 8013). type: int more...
    • fabric_device (Alias name: fabric-device) Fabric device. type: list more...
      • access_token (Alias name: access-token) Device access token. type: list more...
      • device_ip (Alias name: device-ip) Device ip. type: str more...
      • https_port (Alias name: https-port) Https port for fabric device. type: int more...
      • name Device name. type: str more...
    • upstream_ip (Alias name: upstream-ip) Ip address of the fortigate upstream from this fortigate in the security fabric. type: str more...
    • management_port (Alias name: management-port) Overriding port for management connection (overrides admin port). type: int more...
    • management_ip (Alias name: management-ip) Management ip address of this fortigate. type: str more...
    • legacy_authentication (Alias name: legacy-authentication) Enable/disable legacy authentication. type: str choices: [disable, enable] more...
    • license_sharing (Alias name: license-sharing) License sharing. type: str choices: [disable, enable] more...
    • preferred_seats (Alias name: preferred-seats) Preferred seats. type: int more...
    • logging_mode (Alias name: logging-mode) Logging mode (the root fortiproxy in a security fabric must send logs to fortianalyzer). type: str choices: [default, local] 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: Add this FortiGate to a Security Fabric or set up a new Security Fabric on this FortiGate.
      fortinet.fmgdevice.fmgd_system_csf:
        # 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>
        system_csf:
          # accept_auth_by_cert: <value in [disable, enable]>
          # authorization_request_type: <value in [certificate, serial]>
          # certificate: <list or string>
          # configuration_sync: <value in [default, local]>
          # downstream_access: <value in [disable, enable]>
          # downstream_accprofile: <list or string>
          # fabric_connector:
          #   - accprofile: <list or string>
          #     configuration_write_access: <value in [disable, enable]>
          #     serial: <string>
          #     vdom: <list or string>
          # fabric_object_unification: <value in [default, local]>
          # fabric_workers: <integer>
          # file_mgmt: <value in [disable, enable]>
          # file_quota: <integer>
          # file_quota_warning: <integer>
          # fixed_key: <list or string>
          # forticloud_account_enforcement: <value in [disable, enable]>
          # group_name: <string>
          # group_password: <list or string>
          # log_unification: <value in [disable, enable]>
          # saml_configuration_sync: <value in [default, local]>
          # source_ip: <string>
          # status: <value in [disable, enable]>
          # trusted_list:
          #   - action: <value in [deny, accept]>
          #     authorization_type: <value in [certificate, serial]>
          #     certificate: <string>
          #     downstream_authorization: <value in [disable, enable]>
          #     ha_members: <list or string>
          #     index: <integer>
          #     name: <string>
          #     serial: <string>
          #     guaranteed_seats: <integer>
          #     preferred_seats: <integer>
          # uid: <string>
          # upstream: <string>
          # upstream_interface: <list or string>
          # upstream_interface_select_method: <value in [auto, sdwan, specify]>
          # upstream_port: <integer>
          # fabric_device:
          #   - access_token: <list or string>
          #     device_ip: <string>
          #     https_port: <integer>
          #     name: <string>
          # upstream_ip: <string>
          # management_port: <integer>
          # management_ip: <string>
          # legacy_authentication: <value in [disable, enable]>
          # license_sharing: <value in [disable, enable]>
          # preferred_seats: <integer>
          # logging_mode: <value in [default, local]>

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.

Authors

  • Xinwei Du (@dux-fortinet)

  • Xing Li (@lix-fortinet)

  • Jie Xue (@JieX19)

  • Link Zheng (@chillancezen)

  • Frank Shen (@fshen01)

  • Hongbin Lu (@fgtdev-hblu)