:source: fortios_switch_controller_managed_switch.py :orphan: .. fortios_switch_controller_managed_switch: fortios_switch_controller_managed_switch -- Configure FortiSwitch devices that are managed by this FortiGate 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 managed_switch 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 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 devices that are managed by this FortiGate. fortinet.fortios.fortios_switch_controller_managed_switch: vdom: "{{ vdom }}" state: "present" access_token: "" switch_controller_managed_switch: settings_802_1X: link_down_auth: "set-unauth" local_override: "enable" mab_reauth: "disable" mac_called_station_delimiter: "colon" mac_calling_station_delimiter: "colon" mac_case: "lowercase" mac_password_delimiter: "colon" mac_username_delimiter: "colon" max_reauth_attempt: "3" reauth_period: "60" tx_period: "30" access_profile: " (source switch-controller.security-policy.local-access.name)" custom_command: - command_entry: "" command_name: " (source switch-controller.custom-command.command-name)" delayed_restart_trigger: "0" description: "" dhcp_server_access_list: "global" dhcp_snooping_static_client: - ip: "" mac: "" name: "default_name_25" port: "" vlan: " (source system.interface.name)" directly_connected: "0" dynamic_capability: "" dynamically_discovered: "0" firmware_provision: "enable" firmware_provision_latest: "disable" firmware_provision_version: "" flow_identity: "" fsw_wan1_admin: "discovered" fsw_wan1_peer: " (source system.interface.name)" fsw_wan2_admin: "discovered" fsw_wan2_peer: "" igmp_snooping: aging_time: "300" flood_unknown_multicast: "enable" local_override: "enable" vlans: - proxy: "disable" querier: "disable" querier_addr: "" version: "2" vlan_name: " (source system.interface.name)" ip_source_guard: - binding_entry: - entry_name: "" ip: "" mac: "" description: "" port: "" l3_discovered: "0" max_allowed_trunk_members: "0" mclag_igmp_snooping_aware: "enable" mgmt_mode: "0" mirror: - dst: "" name: "default_name_62" src_egress: - name: "default_name_64" src_ingress: - name: "default_name_66" status: "active" switching_packet: "enable" name: "default_name_69" override_snmp_community: "enable" override_snmp_sysinfo: "disable" override_snmp_trap_threshold: "enable" override_snmp_user: "enable" owner_vdom: "" poe_detection_type: "0" poe_lldp_detection: "enable" poe_pre_standard_detection: "enable" ports: - access_mode: "dynamic" acl_group: - name: "default_name_81 (source switch-controller.acl.group.name)" aggregator_mode: "bandwidth" allow_arp_monitor: "disable" allowed_vlans: - vlan_name: " (source system.interface.name)" allowed_vlans_all: "enable" arp_inspection_trust: "untrusted" bundle: "enable" description: "" dhcp_snoop_option82_override: - circuit_id: "" remote_id: "" vlan_name: " (source system.interface.name)" dhcp_snoop_option82_trust: "enable" dhcp_snooping: "untrusted" discard_mode: "none" edge_port: "enable" export_tags: - tag_name: " (source switch-controller.switch-interface-tag.name)" export_to: " (source system.vdom.name)" export_to_pool: " (source switch-controller.virtual-port-pool.name)" export_to_pool_flag: "0" fallback_port: "" fec_capable: "0" fec_state: "disabled" fgt_peer_device_name: "" fgt_peer_port_name: "" fiber_port: "0" flags: "0" flap_duration: "30" flap_rate: "5" flap_timeout: "0" flapguard: "enable" flow_control: "disable" fortilink_port: "0" fortiswitch_acls: - id: "117" igmp_snooping: "enable" igmp_snooping_flood_reports: "enable" igmps_flood_reports: "enable" igmps_flood_traffic: "enable" interface_tags: - tag_name: " (source switch-controller.switch-interface-tag.name)" ip_source_guard: "disable" isl_local_trunk_name: "" isl_peer_device_name: "" isl_peer_port_name: "" lacp_speed: "slow" learning_limit: "0" lldp_profile: " (source switch-controller.lldp-profile.name)" lldp_status: "disable" log_mac_event: "disable" loop_guard: "enabled" loop_guard_timeout: "45" mac_addr: "" matched_dpp_intf_tags: "" matched_dpp_policy: "" max_bundle: "24" mcast_snooping_flood_traffic: "enable" mclag: "enable" mclag_icl_port: "0" media_type: "" member_withdrawal_behavior: "forward" members: - member_name: "" min_bundle: "1" mode: "static" p2p_port: "0" packet_sample_rate: "512" packet_sampler: "enabled" pause_meter: "0" pause_meter_resume: "75%" pd_capable: "0" poe_capable: "0" poe_max_power: "" poe_mode_bt_cabable: "0" poe_port_mode: "ieee802-3af" poe_port_power: "normal" poe_port_priority: "critical-priority" poe_pre_standard_detection: "enable" poe_standard: "" poe_status: "enable" port_name: "" port_number: "0" port_owner: "" port_policy: " (source switch-controller.dynamic-port-policy.name)" port_prefix_type: "0" port_security_policy: " (source switch-controller.security-policy.802-1X.name)" port_selection_criteria: "src-mac" ptp_policy: " (source switch-controller.ptp.interface-policy.name)" ptp_status: "disable" qnq: " (source system.interface.name)" qos_policy: " (source switch-controller.qos.qos-policy.name)" rpvst_port: "disabled" sample_direction: "tx" sflow_counter_interval: "0" sflow_sample_rate: "49999" sflow_sampler: "enabled" speed: "10half" speed_mask: "2147483647" stacking_port: "0" status: "up" sticky_mac: "enable" storm_control_policy: " (source switch-controller.storm-control-policy.name)" stp_bpdu_guard: "enabled" stp_bpdu_guard_timeout: "5" stp_root_guard: "enabled" stp_state: "enabled" switch_id: "" type: "physical" untagged_vlans: - vlan_name: " (source system.interface.name)" virtual_port: "0" vlan: " (source system.interface.name)" pre_provisioned: "0" ptp_profile: " (source switch-controller.ptp.profile.name)" ptp_status: "disable" purdue_level: "1" qos_drop_policy: "taildrop" qos_red_probability: "12" radius_nas_ip: "" radius_nas_ip_override: "disable" remote_log: - csv: "enable" facility: "kernel" name: "default_name_206" port: "514" server: "192.168.100.40" severity: "emergency" status: "enable" route_offload: "disable" route_offload_mclag: "disable" route_offload_router: - router_ip: "" vlan_name: " (source system.interface.name)" router_static: - blackhole: "disable" comment: "Comment." device: " (source switch-controller.managed-switch.system-interface.name)" distance: "10" dst: "" dynamic_gateway: "disable" gateway: "" id: "224" status: "disable" switch_id: " (source switch-controller.managed-switch.switch-id)" vrf: " (source switch-controller.managed-switch.router-vrf.name)" router_vrf: - name: "default_name_229" switch_id: " (source switch-controller.managed-switch.switch-id)" vrfid: "0" sn: "" snmp_community: - events: "cpu-high" hosts: - id: "236" ip: "" id: "238" name: "default_name_239" query_v1_port: "161" query_v1_status: "disable" query_v2c_port: "161" query_v2c_status: "disable" status: "disable" trap_v1_lport: "162" trap_v1_rport: "162" trap_v1_status: "disable" trap_v2c_lport: "162" trap_v2c_rport: "162" trap_v2c_status: "disable" snmp_sysinfo: contact_info: "" description: "" engine_id: "" location: "" status: "disable" snmp_trap_threshold: trap_high_cpu_threshold: "80" trap_log_full_threshold: "90" trap_low_memory_threshold: "80" snmp_user: - auth_proto: "md5" auth_pwd: "" name: "default_name_264" priv_proto: "aes128" priv_pwd: "" queries: "disable" query_port: "161" security_level: "no-auth-no-priv" staged_image_version: "" static_mac: - description: "" id: "273" interface: "" mac: "" type: "static" vlan: " (source system.interface.name)" storm_control: broadcast: "enable" burst_size_level: "0" local_override: "enable" rate: "500" unknown_multicast: "enable" unknown_unicast: "enable" stp_instance: - id: "286" priority: "0" stp_settings: forward_time: "15" hello_time: "2" local_override: "enable" max_age: "20" max_hops: "20" name: "default_name_294" pending_timer: "4" revision: "0" status: "enable" switch_device_tag: "" switch_dhcp_opt43_key: "" switch_id: "" switch_log: local_override: "enable" severity: "emergency" status: "enable" switch_profile: " (source switch-controller.switch-profile.name)" switch_stp_settings: status: "enable" system_dhcp_server: - default_gateway: "" dns_server1: "" dns_server2: "" dns_server3: "" dns_service: "local" id: "314" interface: " (source switch-controller.managed-switch.system-interface.name)" ip_range: - end_ip: "" id: "318" start_ip: "" lease_time: "604800" netmask: "" ntp_server1: "" ntp_server2: "" ntp_server3: "" ntp_service: "local" options: - code: "0" id: "328" ip: "" type: "hex" value: "" status: "disable" switch_id: " (source switch-controller.managed-switch.switch-id)" system_interface: - allowaccess: "ping" interface: " (source switch-controller.managed-switch.ports.port-name)" ip: "" mode: "static" name: "default_name_339" status: "disable" switch_id: " (source switch-controller.managed-switch.switch-id)" type: "vlan" vlan: " (source system.interface.name)" vrf: " (source switch-controller.managed-switch.router-vrf.name)" tdr_supported: "" type: "virtual" version: "0" vlan: - assignment_priority: "128" vlan_name: " (source system.interface.name)" 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.