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.11

FortiSW Version Compatibility


v7.0.0 v7.0.1 v7.0.2 v7.0.3
fortiswitch_system_global yes yes yes yes

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
    • 802.1x_ca_certificate - CA certificate for Port Security (802.1x). type: str
    • 802.1x_certificate - Certificate for Port Security (802.1x). type: str
    • 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_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
    • 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
    • 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_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). 0: Disable DAD; 1: Enable DAD (default); 2: Enable DAD, and disable IPv6 operation if MAC-based duplicate link-local address has been found. 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
    • tcp_mss_min - Minimum allowed TCP MSS value in bytes. type: int
    • tcp6_mss_min - Minimum allowed TCP MSS value in bytes. type: int
    • tftp - Enable/disable TFTP. type: str choices: enable, disable
    • timezone - Time zone. type: str choices: 1, 2, 3, 4, 5, 81, 6, 7, 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, 0, 82, 73, 86, 76

Examples

- hosts: fortiswitch01
  collections:
    - fortinet.fortiswitch
  connection: httpapi
  vars:
   ansible_httpapi_use_ssl: yes
   ansible_httpapi_validate_certs: no
   ansible_httpapi_port: 443
  tasks:
  - name: Configure global range attributes.
    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_port: "10"
        admin_scp: "enable"
        admin_server_cert: "<your_own_value>"
        admin_sport: "13"
        admin_ssh_grace_time: "14"
        admin_ssh_port: "15"
        admin_ssh_v1: "enable"
        admin_telnet_port: "17"
        admintimeout: "18"
        alert_interval: "19"
        alertd_relog: "enable"
        allow_subnet_overlap: "enable"
        arp_timeout: "22"
        asset_tag: "<your_own_value>"
        auto_isl: "enable"
        cfg_revert_timeout: "25"
        cfg_save: "automatic"
        clt_cert_req: "enable"
        csr_ca_attribute: "enable"
        daily_restart: "enable"
        detect_ip_conflict: "enable"
        dh_params: "31"
        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: "37"
        dhcps_db_per_port_learn_limit: "38"
        dst: "enable"
        failtime: "40"
        fortilink_auto_discovery: "enable"
        hostname: "myhostname"
        image_rotation: "disable"
        interval: "44"
        ip_conflict_ignore_default: "enable"
        ipv6_accept_dad: "46"
        ipv6_all_forwarding: "enable"
        kernel_crashlog: "enable"
        kernel_devicelog: "enable"
        l3_host_expiry: "enable"
        language: "browser"
        ldapconntimeout: "52"
        post_login_banner: "<your_own_value>"
        pre_login_banner: "<your_own_value>"
        private_data_encryption: "disable"
        radius_coa_port: "56"
        radius_port: "57"
        remoteauthtimeout: "58"
        restart_time: "<your_own_value>"
        revision_backup_on_logout: "enable"
        revision_backup_on_upgrade: "enable"
        strong_crypto: "enable"
        switch_mgmt_mode: "local"
        tcp_mss_min: "64"
        tcp6_mss_min: "65"
        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.