:source: fortios_switch_controller_global.py
:orphan:
.. fortios_switch_controller_global:
fortios_switch_controller_global -- Configure FortiSwitch global settings in Fortinet's FortiOS and FortiGate.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. versionadded:: 2.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- 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
Requirements
------------
The below requirements are needed on the host that executes this module.
- ansible>=2.16
Tips
----
Using member operation to add an element to an existing object.
FortiOS Version Compatibility
-----------------------------
Supported Version Ranges: v6.0.0 -> v7.6.6
Parameters
----------
.. raw:: html
- 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 -> 7.6.6 |
- 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 -> v6.2.7 |
| [disable] |
v6.0.0 -> v6.2.7 |
- 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 -> 7.6.6 |
| [disable] |
v6.2.0 -> 7.6.6 |
| [enable] |
v6.2.0 -> 7.6.6 |
- 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 -> 7.6.6 |
- command_entry - List of FortiSwitch commands. type: str required: true
more...
|
Supported Version Ranges |
| command_entry |
v6.2.0 -> 7.6.6 |
- 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 -> 7.6.6 |
- 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 -> 7.6.6 |
- 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 -> 7.6.6 |
| [intfname] |
v7.4.0 -> 7.6.6 |
| [vlan] |
v7.4.0 -> 7.6.6 |
| [hostname] |
v7.4.0 -> 7.6.6 |
| [mode] |
v7.4.0 -> 7.6.6 |
| [description] |
v7.4.0 -> 7.6.6 |
- dhcp_option82_format - DHCP option-82 format string. type: str choices: ascii, legacy
more...
|
Supported Version Ranges |
| dhcp_option82_format |
v7.4.0 -> 7.6.6 |
| [ascii] |
v7.4.0 -> 7.6.6 |
| [legacy] |
v7.4.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [mac] |
v7.4.0 -> 7.6.6 |
| [hostname] |
v7.4.0 -> 7.6.6 |
| [ip] |
v7.4.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v7.0.1 -> 7.6.6 |
| [disable] |
v7.0.1 -> 7.6.6 |
- 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 -> 7.6.6 |
- 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 -> 7.6.6 |
| [drop-untrusted] |
v7.4.0 -> 7.6.6 |
| [forward-untrusted] |
v7.4.0 -> 7.6.6 |
- 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 -> 7.6.6 |
- disable_discovery - Prevent this FortiSwitch from discovering. type: list member_path: disable_discovery:name
more...
| Supported Version Ranges |
| disable_discovery |
v6.0.0 -> 7.6.6 |
- name - FortiSwitch Serial-number. type: str required: true
more...
|
Supported Version Ranges |
| name |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [disable] |
v7.0.0 -> 7.6.6 |
| [enable] |
v7.0.0 -> 7.6.6 |
- firewall_auth_user_hold_period - Time period in minutes to hold firewall authenticated MAC users (5 - 1440). type: int
more...
|
Supported Version Ranges |
| firewall_auth_user_hold_period |
v7.6.4 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v7.0.4 -> 7.6.6 |
| [disable] |
v7.0.4 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.0.0 -> 7.6.6 |
| [disable] |
v6.0.0 -> 7.6.6 |
- 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 -> 7.6.6 |
- mac_event_logging - Enable/disable MAC address event logging. type: str choices: enable, disable
more...
|
Supported Version Ranges |
| mac_event_logging |
v6.2.0 -> 7.6.6 |
| [enable] |
v6.2.0 -> 7.6.6 |
| [disable] |
v6.2.0 -> 7.6.6 |
- 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 -> 7.6.6 |
- mac_violation_timer - Set timeout for Learning Limit Violations (0 = disabled). type: int
more...
|
Supported Version Ranges |
| mac_violation_timer |
v6.0.0 -> 7.6.6 |
- quarantine_mode - Quarantine mode. type: str choices: by-vlan, by-redirect
more...
|
Supported Version Ranges |
| quarantine_mode |
v6.4.0 -> 7.6.6 |
| [by-vlan] |
v6.4.0 -> 7.6.6 |
| [by-redirect] |
v6.4.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [enable] |
v6.2.0 -> 7.6.6 |
| [disable] |
v6.2.0 -> 7.6.6 |
- switch_on_deauth - No-operation/Factory-reset the managed FortiSwitch on deauthorization. type: str choices: no-op, factory-reset
more...
|
Supported Version Ranges |
| switch_on_deauth |
v7.6.1 -> 7.6.6 |
| [no-op] |
v7.6.1 -> 7.6.6 |
| [factory-reset] |
v7.6.1 -> 7.6.6 |
- 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 -> 7.6.6 |
| [mac-cache] |
v6.4.0 -> v6.4.0 |
| [lldp] |
v6.4.0 -> v6.4.0 |
| [dhcp-snooping] |
v6.4.0 -> v6.4.0 |
| [l2-db] |
v6.4.0 -> v6.4.0 |
| [l3-db] |
v6.4.0 -> v6.4.0 |
- 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 -> 7.6.6 |
| [all] |
v6.2.0 -> 7.6.6 |
| [defined] |
v6.2.0 -> 7.6.6 |
- 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 -> 7.6.6 |
| [description] |
v7.4.1 -> 7.6.6 |
| [name] |
v7.4.1 -> 7.6.6 |
- vlan_optimization - FortiLink VLAN optimization. type: str choices: prune, configured, none, enable, disable
more...
|
Supported Version Ranges |
| vlan_optimization |
v6.2.0 -> 7.6.6 |
| [prune] |
v7.6.1 -> 7.6.6 |
| [configured] |
v7.6.1 -> 7.6.6 |
| [none] |
v7.6.1 -> 7.6.6 |
| [enable] |
v6.2.0 -> v7.6.0 |
| [disable] |
v6.2.0 -> v7.6.0 |
Notes
-----
.. note::
- Legacy fortiosapi has been deprecated, httpapi is the preferred way to run playbooks
- The module supports check_mode.
Examples
--------
.. code-block:: yaml+jinja
- 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: ""
command_name: " (source switch-controller.custom-command.command-name)"
default_virtual_switch_vlan: " (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"
firewall_auth_user_hold_period: "5"
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"
switch_on_deauth: "no-op"
update_user_device: "mac-cache"
vlan_all_mode: "all"
vlan_identity: "description"
vlan_optimization: "prune"
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:
.. raw:: html
- 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.