fortiswitch_system_global – Configure global range attributes 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 system feature and global 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_system_global 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
  • system_global - Configure global range attributes. type: dict
    • admin_concurrent - Enable/disable concurrent login of adminstrative users. type: str choices: enable, disable
    • admin_https_pki_required - Enable/disable HTTPS login page when PKI is enabled. type: str choices: enable, disable
    • admin_https_ssl_versions - Allowed SSL/TLS versions for web administration. type: str choices: tlsv1-0, tlsv1-1, tlsv1-2, tlsv1-3
    • admin_lockout_duration - Lockout duration for FortiSwitch administration (1 - 2147483647 sec). type: int
    • admin_lockout_threshold - Lockout threshold for FortiSwitch administration. type: int
    • admin_password_hash - Admin password hash algorithm. (sha1, sha256, pbkdf2) type: str choices: sha1, sha256, pbkdf2, pbkdf2-high
    • admin_port - Administrative access HTTP port (1 - 65535). type: int
    • admin_scp - Enable/disable downloading of system configuraiton using SCP. type: str choices: enable, disable
    • admin_server_cert - Administrative HTTPS server certificate. type: str
    • admin_sport - Administrative access HTTPS port (1 - 65535). type: int
    • admin_ssh_grace_time - Administrative access login grace time (10 - 3600 sec). type: int
    • admin_ssh_port - Administrative access SSH port (1 - 65535). type: int
    • admin_ssh_v1 - Enable/disable SSH v1 compatibility. type: str choices: enable, disable
    • admin_telnet_port - Administrative access TELNET port (1 - 65535). type: int
    • admintimeout - Idle time-out for firewall administration. type: int
    • alert_interval - Interval between each syslog entry when a sensor is out-of-range with respect to its threshold (in mins). type: int
    • alertd_relog - Enable/disable re-logs when a sensor exceeds it"s threshold. type: str choices: enable, disable
    • allow_subnet_overlap - Enable/disable subnet overlap. type: str choices: enable, disable
    • arp_timeout - ARP timeout value in seconds. type: int
    • asset_tag - Asset tag. type: str
    • auto_isl - Enable/disable automatic inter-switch LAG. type: str choices: enable, disable
    • ca_certificate_802dot1x - CA certificate for Port Security (802.1x). type: str
    • certificate_802dot1x - Certificate for Port Security (802.1x). type: str
    • cfg_revert_timeout - Time-out for reverting to the last saved configuration (10 - 2147483647). type: int
    • cfg_save - Configure configuration saving mode (valid only for changes made in the CLI). type: str choices: automatic, manual, revert
    • clt_cert_req - Enable the requirement of client certificate for GUI login. type: str choices: enable, disable
    • csr_ca_attribute - Enable/disable CA attribute in CSR. type: str choices: enable, disable
    • daily_restart - Enable/disable FortiSwitch daily reboot. type: str choices: enable, disable
    • delaycli_timeout_cleanup - Time-out for cleaning up the delay cli execution completion data (1-1440 minutes). type: int
    • detect_ip_conflict - Enable/disable detection of IP address conflicts. type: str choices: enable, disable
    • dh_params - Minimum size of Diffie-Hellman prime for HTTPS/SSH (bits). type: int
    • dhcp_circuit_id - List the parameters to be included to inform about client identification. type: str choices: intfname, vlan, hostname, mode, description
    • dhcp_client_location - List the parameters to be included to inform about client location. type: str choices: intfname, vlan, hostname, mode, description
    • dhcp_option_format - DHCP Option format string. type: str choices: legacy, ascii
    • dhcp_remote_id - List the parameters to be included in remote-id field. type: str choices: mac, hostname, ip
    • dhcp_server_access_list - Enable/Disable trusted DHCP Server list. type: str choices: enable, disable
    • dhcp_snoop_client_req - Client DHCP packet broadcast mode. type: str choices: forward-untrusted, drop-untrusted
    • dhcps_db_exp - Expiry time for dhcp-snoop server-db entry (300-259200 sec). type: int
    • dhcps_db_per_port_learn_limit - Per Interface dhcp-server entries learn limit . type: int
    • dst - Enable/disable daylight saving time. type: str choices: enable, disable
    • failtime - Fail-time for PING server lost. type: int
    • fortilink_auto_discovery - Enable/disable automatic discovery of FortiLink. type: str choices: enable, disable
    • hostname - FortiSwitch hostname. type: str
    • image_rotation - Enable/disable image upgrade partition rotation. type: str choices: disable, enable
    • interval - Dead gateway detection interval. type: int
    • ip_conflict_ignore_default - Enable/disable IP conflict detection for default IP address. type: str choices: enable, disable
    • ipv6_accept_dad - Whether to accept ipv6 DAD (Duplicate Address Detection). type: int
    • ipv6_all_forwarding - Enable/disable ipv6 all forwarding. type: str choices: enable, disable
    • kernel_crashlog - Enable/disable capture of kernel error messages to crash log. type: str choices: enable, disable
    • kernel_devicelog - Enable/disable capture of kernel device messages to log. type: str choices: enable, disable
    • l3_host_expiry - Enable/disable l3 host expiry. type: str choices: enable, disable
    • language - GUI display language. type: str choices: browser, english, simch, japanese, korean, spanish, trach, french, portuguese, german
    • ldapconntimeout - LDAP connection time-out (0 - 2147483647 milliseconds). type: int
    • post_login_banner - System post-login banner message. type: str
    • pre_login_banner - System pre-login banner message. type: str
    • private_data_encryption - Enable/disable private data encryption using an AES 128-bit key. type: str choices: disable, enable
    • radius_coa_port - RADIUS CoA port number. type: int
    • radius_port - RADIUS server port number. type: int
    • remoteauthtimeout - Remote authentication (RADIUS/LDAP) time-out (0 - 300). type: int
    • restart_time - Daily restart time . type: str
    • revision_backup_on_logout - Enable/disable automatic revision backup upon logout. type: str choices: enable, disable
    • revision_backup_on_upgrade - Enable/disable automatic revision backup upon upgrade of system image. type: str choices: enable, disable
    • strong_crypto - Enable/disable strong cryptography for HTTPS/SSH access. type: str choices: enable, disable
    • switch_mgmt_mode - Switch mode setting. type: str choices: local, fortilink
    • tcp6_mss_min - Minimum allowed TCP MSS value in bytes. type: int
    • tcp_mss_min - Minimum allowed TCP MSS value in bytes. type: int
    • tcp_options - Enable/disable TCP options (timestamps, SACK, window scaling). type: str choices: enable, disable
    • tftp - Enable/disable TFTP. type: str choices: enable, disable
    • timezone - Time zone. type: str choices: 01, 02, 03, 04, 05, 81, 06, 07, 08, 09, 10, 11, 12, 13, 74, 14, 77, 15, 87, 16, 17, 18, 19, 20, 75, 21, 22, 23, 24, 80, 79, 25, 26, 27, 28, 78, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 83, 84, 40, 85, 41, 42, 43, 39, 44, 46, 47, 51, 48, 45, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 00, 82, 73, 86, 76, 88, 89, 90, 91, 92

Examples

- name: Configure global range attributes.
  fortinet.fortiswitch.fortiswitch_system_global:
      system_global:
          802.1x_ca_certificate: "<your_own_value>"
          802.1x_certificate: "<your_own_value>"
          admin_concurrent: "enable"
          admin_https_pki_required: "enable"
          admin_https_ssl_versions: "tlsv1-0"
          admin_lockout_duration: "8"
          admin_lockout_threshold: "9"
          admin_password_hash: "sha1"
          admin_port: "11"
          admin_scp: "enable"
          admin_server_cert: "<your_own_value>"
          admin_sport: "14"
          admin_ssh_grace_time: "15"
          admin_ssh_port: "16"
          admin_ssh_v1: "enable"
          admin_telnet_port: "18"
          admintimeout: "19"
          alert_interval: "20"
          alertd_relog: "enable"
          allow_subnet_overlap: "enable"
          arp_timeout: "23"
          asset_tag: "<your_own_value>"
          auto_isl: "enable"
          cfg_revert_timeout: "26"
          cfg_save: "automatic"
          clt_cert_req: "enable"
          csr_ca_attribute: "enable"
          daily_restart: "enable"
          delaycli_timeout_cleanup: "31"
          detect_ip_conflict: "enable"
          dh_params: "33"
          dhcp_circuit_id: "intfname"
          dhcp_client_location: "intfname"
          dhcp_option_format: "legacy"
          dhcp_remote_id: "mac"
          dhcp_server_access_list: "enable"
          dhcp_snoop_client_req: "forward-untrusted"
          dhcps_db_exp: "40"
          dhcps_db_per_port_learn_limit: "41"
          dst: "enable"
          failtime: "43"
          fortilink_auto_discovery: "enable"
          hostname: "myhostname"
          image_rotation: "disable"
          interval: "47"
          ip_conflict_ignore_default: "enable"
          ipv6_accept_dad: "49"
          ipv6_all_forwarding: "enable"
          kernel_crashlog: "enable"
          kernel_devicelog: "enable"
          l3_host_expiry: "enable"
          language: "browser"
          ldapconntimeout: "55"
          post_login_banner: "<your_own_value>"
          pre_login_banner: "<your_own_value>"
          private_data_encryption: "disable"
          radius_coa_port: "59"
          radius_port: "60"
          remoteauthtimeout: "61"
          restart_time: "<your_own_value>"
          revision_backup_on_logout: "enable"
          revision_backup_on_upgrade: "enable"
          strong_crypto: "enable"
          switch_mgmt_mode: "local"
          tcp6_mss_min: "67"
          tcp_mss_min: "68"
          tcp_options: "enable"
          tftp: "enable"
          timezone: "01"

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.