fortiswitch_switch_trunk – Link-aggregation 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 switch feature and trunk 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_switch_trunk | 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
- state - Indicates whether to create or remove the object. type: str required: true choices: present, absent
- switch_trunk - Link-aggregation. type: dict
- aggregator_mode - LACP Member Select Mode. type: str choices: bandwidth, count
- auto_isl - Trunk with auto-isl. type: int
- bundle - Enable bundle. type: str choices: enable, disable
- description - Description. type: str
- fallback_port - LACP fallback port. type: str
- fortilink - FortiLink trunk. type: int
- hb_dst_ip - Destination IP address of heartbeat packet. type: str
- hb_dst_udp_port - Destination UDP port of heartbeat packet. type: int
- hb_in_vlan - Receive VLAN ID in heartbeat packet. type: int
- hb_out_vlan - Transmit VLAN ID in heartbeat packet. type: int
- hb_src_ip - Source IP address of heartbeat packet. type: str
- hb_src_udp_port - Source UDP port of heartbeat packet. type: int
- hb_verify - Enable/disable heartbeat packet strict validation. type: str choices: enable, disable
- isl_fortilink - ISL fortiLink trunk. type: int
- lacp_speed - LACP speed. type: str choices: slow, fast
- max_bundle - Maximum size of bundle. type: int
- max_miss_heartbeats - Maximum tolerant missed heartbeats. type: int
- mclag - Multi Chassis LAG. type: str choices: enable, disable
- mclag_icl - MCLAG inter-chassis-link. type: str choices: enable, disable
- mclag_mac_address - MCLAG MAC address. type: str
- member_withdrawal_behavior - Port behaviors after it withdraws because of loss of control packets. type: str choices: forward, block
- members - Aggregated interfaces. type: list
- member_name - Interface name. type: str
- min_bundle - Minimum size of bundle. type: int
- mode - Link Aggreation mode. type: str choices: static, lacp-passive, lacp-active, fortinet-trunk
- name - Trunk name. type: str required: true
- port_extension - Port extension enable. type: str choices: enable, disable
- port_extension_trigger - Number of failed port to trigger the whole trunk down. type: int
- port_selection_criteria - Algorithm for aggregate port selection. type: str choices: src-mac, dst-mac, src-dst-mac, src-ip, dst-ip, src-dst-ip
- restricted - Restricted ISL ICL trunk. type: int
- static_isl - Static ISL. type: str choices: enable, disable
- static_isl_auto_vlan - User ISL auto VLAN. type: str choices: enable, disable
- trunk_id - Internal id. type: int
Examples
- name: Link-aggregation.
fortinet.fortiswitch.fortiswitch_switch_trunk:
state: "present"
switch_trunk:
aggregator_mode: "bandwidth"
auto_isl: "4"
bundle: "enable"
description: "<your_own_value>"
fallback_port: "<your_own_value>"
fortilink: "8"
hb_dst_ip: "<your_own_value>"
hb_dst_udp_port: "10"
hb_in_vlan: "11"
hb_out_vlan: "12"
hb_src_ip: "<your_own_value>"
hb_src_udp_port: "14"
hb_verify: "enable"
isl_fortilink: "16"
lacp_speed: "slow"
max_bundle: "18"
max_miss_heartbeats: "19"
mclag: "enable"
mclag_icl: "enable"
mclag_mac_address: "<your_own_value>"
member_withdrawal_behavior: "forward"
members:
-
member_name: "<your_own_value> (source switch.physical-port.name)"
min_bundle: "26"
mode: "static"
name: "default_name_28"
port_extension: "enable"
port_extension_trigger: "30"
port_selection_criteria: "src-mac"
restricted: "32"
static_isl: "enable"
static_isl_auto_vlan: "enable"
trunk_id: "35"
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.