Skip to content

Latest commit

 

History

History
700 lines (656 loc) · 32.2 KB

fortios_switch_controller_global.rst

File metadata and controls

700 lines (656 loc) · 32.2 KB
source:fortios_switch_controller_global.py
orphan:

fortios_switch_controller_global -- Configure FortiSwitch global settings in Fortinet's FortiOS and FortiGate.

.. versionadded:: 2.0.0

  • This module is able to configure a FortiGate or FortiOS (FOS) device by allowing the user to set and modify switch_controller feature and global category. Examples include all parameters and values need to be adjusted to datasources before usage. Tested with FOS v6.0.0

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

  • ansible>=2.14

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


Supported Version Ranges
fortios_switch_controller_global v6.0.0 -> latest

  • 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
  • switch_controller_global - Configure FortiSwitch global settings. type: dict more...
    Supported Version Ranges
    switch_controller_global v6.0.0 -> latest
    • allow_multiple_interfaces - Enable/disable multiple FortiLink interfaces for redundant connections between a managed FortiSwitch and FortiGate. type: str choices: enable, disable more...
      Supported Version Ranges
      allow_multiple_interfaces v6.0.0 -> v6.2.7 v6.4.1 -> v6.4.1
      [enable] v6.0.0 -> latest
      [disable] v6.0.0 -> latest
    • bounce_quarantined_link - Enable/disable bouncing (administratively bring the link down, up) of a switch port where a quarantined device was seen last. Helps to re-initiate the DHCP process for a device. type: str choices: disable, enable more...
      Supported Version Ranges
      bounce_quarantined_link v6.2.0 -> latest
      [disable] v6.0.0 -> latest
      [enable] v6.0.0 -> latest
    • custom_command - List of custom commands to be pushed to all FortiSwitches in the VDOM. type: list member_path: custom_command:command_entry more...
      Supported Version Ranges
      custom_command v6.2.0 -> latest
      • command_entry - List of FortiSwitch commands. type: str required: true more...
        Supported Version Ranges
        command_entry v6.2.0 -> latest
      • command_name - Name of custom command to push to all FortiSwitches in VDOM. Source switch-controller.custom-command.command-name. type: str more...
        Supported Version Ranges
        command_name v6.2.0 -> latest
    • default_virtual_switch_vlan - Default VLAN for ports when added to the virtual-switch. Source system.interface.name. type: str more...
      Supported Version Ranges
      default_virtual_switch_vlan v6.0.0 -> latest
    • dhcp_option82_circuit_id - List the parameters to be included to inform about client identification. type: list choices: intfname, vlan, hostname, mode, description more...
      Supported Version Ranges
      dhcp_option82_circuit_id v7.4.0 -> latest
      [intfname] v6.0.0 -> latest
      [vlan] v6.0.0 -> latest
      [hostname] v6.0.0 -> latest
      [mode] v6.0.0 -> latest
      [description] v6.0.0 -> latest
    • dhcp_option82_format - DHCP option-82 format string. type: str choices: ascii, legacy more...
      Supported Version Ranges
      dhcp_option82_format v7.4.0 -> latest
      [ascii] v6.0.0 -> latest
      [legacy] v6.0.0 -> latest
    • dhcp_option82_remote_id - List the parameters to be included to inform about client identification. type: list choices: mac, hostname, ip more...
      Supported Version Ranges
      dhcp_option82_remote_id v7.4.0 -> latest
      [mac] v6.0.0 -> latest
      [hostname] v6.0.0 -> latest
      [ip] v6.0.0 -> latest
    • dhcp_server_access_list - Enable/disable DHCP snooping server access list. type: str choices: enable, disable more...
      Supported Version Ranges
      dhcp_server_access_list v7.0.1 -> latest
      [enable] v6.0.0 -> latest
      [disable] v6.0.0 -> latest
    • dhcp_snoop_client_db_exp - Expiry time for DHCP snooping server database entries (300 - 259200 sec). type: int more...
      Supported Version Ranges
      dhcp_snoop_client_db_exp v7.4.0 -> latest
    • dhcp_snoop_client_req - Client DHCP packet broadcast mode. type: str choices: drop-untrusted, forward-untrusted more...
      Supported Version Ranges
      dhcp_snoop_client_req v7.4.0 -> latest
      [drop-untrusted] v6.0.0 -> latest
      [forward-untrusted] v6.0.0 -> latest
    • dhcp_snoop_db_per_port_learn_limit - Per Interface dhcp-server entries learn limit (0 - 1024). type: int more...
      Supported Version Ranges
      dhcp_snoop_db_per_port_learn_limit v7.4.0 -> latest
    • disable_discovery - Prevent this FortiSwitch from discovering. type: list member_path: disable_discovery:name more...
      Supported Version Ranges
      disable_discovery v6.0.0 -> latest
      • name - Managed device ID. type: str required: true more...
        Supported Version Ranges
        name v6.0.0 -> latest
    • fips_enforce - Enable/disable enforcement of FIPS on managed FortiSwitch devices. type: str choices: disable, enable more...
      Supported Version Ranges
      fips_enforce v7.0.0 -> latest
      [disable] v6.0.0 -> latest
      [enable] v6.0.0 -> latest
    • firmware_provision_on_authorization - Enable/disable automatic provisioning of latest firmware on authorization. type: str choices: enable, disable more...
      Supported Version Ranges
      firmware_provision_on_authorization v7.0.4 -> latest
      [enable] v6.0.0 -> latest
      [disable] v6.0.0 -> latest
    • https_image_push - Enable/disable image push to FortiSwitch using HTTPS. type: str choices: enable, disable more...
      Supported Version Ranges
      https_image_push v6.0.0 -> latest
      [enable] v6.0.0 -> latest
      [disable] v6.0.0 -> latest
    • log_mac_limit_violations - Enable/disable logs for Learning Limit Violations. type: str choices: enable, disable more...
      Supported Version Ranges
      log_mac_limit_violations v6.0.0 -> latest
      [enable] v6.0.0 -> latest
      [disable] v6.0.0 -> latest
    • mac_aging_interval - Time after which an inactive MAC is aged out (10 - 1000000 sec). type: int more...
      Supported Version Ranges
      mac_aging_interval v6.0.0 -> latest
    • mac_event_logging - Enable/disable MAC address event logging. type: str choices: enable, disable more...
      Supported Version Ranges
      mac_event_logging v6.2.0 -> latest
      [enable] v6.0.0 -> latest
      [disable] v6.0.0 -> latest
    • mac_retention_period - Time in hours after which an inactive MAC is removed from client DB (0 = aged out based on mac-aging-interval). type: int more...
      Supported Version Ranges
      mac_retention_period v6.0.0 -> latest
    • mac_violation_timer - Set timeout for Learning Limit Violations (0 = disabled). type: int more...
      Supported Version Ranges
      mac_violation_timer v6.0.0 -> latest
    • quarantine_mode - Quarantine mode. type: str choices: by-vlan, by-redirect more...
      Supported Version Ranges
      quarantine_mode v6.4.0 -> latest
      [by-vlan] v6.0.0 -> latest
      [by-redirect] v6.0.0 -> latest
    • sn_dns_resolution - Enable/disable DNS resolution of the FortiSwitch unit"s IP address with switch name. type: str choices: enable, disable more...
      Supported Version Ranges
      sn_dns_resolution v6.2.0 -> latest
      [enable] v6.0.0 -> latest
      [disable] v6.0.0 -> latest
    • update_user_device - Control which sources update the device user list. type: list choices: mac-cache, lldp, dhcp-snooping, l2-db, l3-db more...
      Supported Version Ranges
      update_user_device v6.4.0 -> v6.4.0 v6.4.4 -> latest
      [mac-cache] v6.0.0 -> latest
      [lldp] v6.0.0 -> latest
      [dhcp-snooping] v6.0.0 -> latest
      [l2-db] v6.0.0 -> latest
      [l3-db] v6.0.0 -> latest
    • vlan_all_mode - VLAN configuration mode, user-defined-vlans or all-possible-vlans. type: str choices: all, defined more...
      Supported Version Ranges
      vlan_all_mode v6.2.0 -> latest
      [all] v6.0.0 -> latest
      [defined] v6.0.0 -> latest
    • vlan_identity - Identity of the VLAN. Commonly used for RADIUS Tunnel-Private-Group-Id. type: str choices: description, name more...
      Supported Version Ranges
      vlan_identity v7.4.1 -> latest
      [description] v6.0.0 -> latest
      [name] v6.0.0 -> latest
    • vlan_optimization - FortiLink VLAN optimization. type: str choices: enable, disable more...
      Supported Version Ranges
      vlan_optimization v6.2.0 -> latest
      [enable] v6.0.0 -> latest
      [disable] v6.0.0 -> latest

Note

  • Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- name: Configure FortiSwitch global settings.
  fortinet.fortios.fortios_switch_controller_global:
      vdom: "{{ vdom }}"
      switch_controller_global:
          allow_multiple_interfaces: "enable"
          bounce_quarantined_link: "disable"
          custom_command:
              -
                  command_entry: "<your_own_value>"
                  command_name: "<your_own_value> (source switch-controller.custom-command.command-name)"
          default_virtual_switch_vlan: "<your_own_value> (source system.interface.name)"
          dhcp_option82_circuit_id: "intfname"
          dhcp_option82_format: "ascii"
          dhcp_option82_remote_id: "mac"
          dhcp_server_access_list: "enable"
          dhcp_snoop_client_db_exp: "86400"
          dhcp_snoop_client_req: "drop-untrusted"
          dhcp_snoop_db_per_port_learn_limit: "64"
          disable_discovery:
              -
                  name: "default_name_17"
          fips_enforce: "disable"
          firmware_provision_on_authorization: "enable"
          https_image_push: "enable"
          log_mac_limit_violations: "enable"
          mac_aging_interval: "300"
          mac_event_logging: "enable"
          mac_retention_period: "24"
          mac_violation_timer: "0"
          quarantine_mode: "by-vlan"
          sn_dns_resolution: "enable"
          update_user_device: "mac-cache"
          vlan_all_mode: "all"
          vlan_identity: "description"
          vlan_optimization: "enable"

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
  • This module is not guaranteed to have a backwards compatible interface.
  • 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.