:source: fmgd_switchcontroller_managedswitch.py :orphan: .. _fmgd_switchcontroller_managedswitch: fmgd_switchcontroller_managedswitch -- Configure FortiSwitch devices that are managed by this FortiGate. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. versionadded:: 1.0.0 .. contents:: :local: :depth: 1 Synopsis -------- - This module is able to configure a FortiManager device. - Examples include all parameters and values need to be adjusted to data sources before usage. - Tested with FortiManager v7.x. Requirements ------------ The below requirements are needed on the host that executes this module. - ansible-core>=2.16.0 FortiManager Version Compatibility ---------------------------------- .. raw:: html

Supported Version Ranges: v7.2.6 -> v7.2.12, v7.4.3 -> latest

Parameters ---------- .. raw:: html Notes ----- .. note:: - Running in workspace locking mode is supported in this FortiManager module, the top level parameters workspace_locking_adom and workspace_locking_timeout help do the work. - To create or update an object, use state: present directive. - To delete an object, use state: absent directive - Normally, running one module can fail when a non-zero rc is returned. you can also override the conditions to fail or succeed with parameters rc_failed and rc_succeeded Examples -------- .. code-block:: yaml+jinja - name: Example playbook (generated based on argument schema) hosts: fortimanagers connection: httpapi gather_facts: false vars: ansible_httpapi_use_ssl: true ansible_httpapi_validate_certs: false ansible_httpapi_port: 443 tasks: - name: Configure FortiSwitch devices that are managed by this FortiGate. fortinet.fmgdevice.fmgd_switchcontroller_managedswitch: # bypass_validation: false # workspace_locking_adom: # workspace_locking_timeout: 300 # rc_succeeded: [0, -2, -3, ...] # rc_failed: [-2, -3, ...] device: vdom: state: present # switchcontroller_managedswitch: switch_id: "your value" # Required variable, string # 802_1X_settings: # link_down_auth: # local_override: # mab_reauth: # mac_called_station_delimiter: # mac_calling_station_delimiter: # mac_case: # mac_password_delimiter: # mac_username_delimiter: # max_reauth_attempt: # reauth_period: # tx_period: # _platform: # access_profile: # custom_command: # - command_entry: # command_name: # delayed_restart_trigger: # description: # dhcp_server_access_list: # dhcp_snooping_static_client: # - ip: # mac: # name: # port: # vlan: # directly_connected: # dynamic_capability: # dynamically_discovered: # firmware_provision: # firmware_provision_latest: # firmware_provision_version: # flow_identity: # fsw_wan1_admin: # fsw_wan1_peer: # fsw_wan2_admin: # fsw_wan2_peer: # igmp_snooping: # aging_time: # flood_unknown_multicast: # local_override: # vlans: # - proxy: # querier: # querier_addr: # version: # vlan_name: # ip_source_guard: # - binding_entry: # - entry_name: # ip: # mac: # description: # port: # l3_discovered: # max_allowed_trunk_members: # mclag_igmp_snooping_aware: # mgmt_mode: # mirror: # - dst: # name: # src_egress: # src_ingress: # status: # switching_packet: # override_snmp_community: # override_snmp_sysinfo: # override_snmp_trap_threshold: # override_snmp_user: # owner_vdom: # poe_detection_type: # poe_pre_standard_detection: # ports: # - access_mode: # acl_group: # aggregator_mode: # allow_arp_monitor: # allowed_vlans: # allowed_vlans_all: # arp_inspection_trust: # authenticated_port: # bundle: # description: # dhcp_snoop_option82_override: # - circuit_id: # remote_id: # vlan_name: # dhcp_snoop_option82_trust: # dhcp_snooping: # discard_mode: # dsl_profile: # edge_port: # encrypted_port: # export_to: # export_to_pool: # export_to_pool_flag: # fallback_port: # fec_capable: # fec_state: # fgt_peer_device_name: # fgt_peer_port_name: # fiber_port: # flags: # flap_duration: # flap_rate: # flap_timeout: # flapguard: # flow_control: # fortilink_port: # fortiswitch_acls: # igmp_snooping_flood_reports: # interface_tags: # ip_source_guard: # isl_local_trunk_name: # isl_peer_device_name: # isl_peer_device_sn: # isl_peer_port_name: # lacp_speed: # learning_limit: # link_status: # lldp_profile: # lldp_status: # loop_guard: # loop_guard_timeout: # mac_addr: # matched_dpp_intf_tags: # matched_dpp_policy: # max_bundle: # mcast_snooping_flood_traffic: # mclag: # mclag_icl_port: # media_type: # member_withdrawal_behavior: # members: # min_bundle: # mode: # p2p_port: # packet_sample_rate: # packet_sampler: # pause_meter: # pause_meter_resume: # poe_capable: # poe_max_power: # poe_mode_bt_cabable: # poe_port_mode: # poe_port_power: # poe_port_priority: # poe_pre_standard_detection: # poe_standard: # poe_status: # port_name: # port_number: # port_owner: # port_policy: # port_prefix_type: # port_security_policy: # port_selection_criteria: # ptp_policy: # ptp_status: # qos_policy: # restricted_auth_port: # rpvst_port: # sample_direction: # sflow_counter_interval: # speed: # speed_mask: # stacking_port: # status: # sticky_mac: # storm_control_policy: # stp_bpdu_guard: # stp_bpdu_guard_timeout: # stp_root_guard: # stp_state: # switch_id: # trunk_member: # type: # untagged_vlans: # virtual_port: # vlan: # igmps_flood_reports: # igmps_flood_traffic: # export_tags: # igmp_snooping: # log_mac_event: # pd_capable: # qnq: # pre_provisioned: # ptp_profile: # ptp_status: # purdue_level: # qos_drop_policy: # qos_red_probability: # radius_nas_ip: # radius_nas_ip_override: # remote_log: # - csv: # facility: # name: # port: # server: # severity: # status: # route_offload: # route_offload_mclag: # route_offload_router: # - router_ip: # vlan_name: # sn: # snmp_community: # - events: # - "cpu-high" # - "mem-low" # - "log-full" # - "intf-ip" # - "ent-conf-change" # - "l2mac" # hosts: # - id: # ip: # id: # name: # query_v1_port: # query_v1_status: # query_v2c_port: # query_v2c_status: # status: # trap_v1_lport: # trap_v1_rport: # trap_v1_status: # trap_v2c_lport: # trap_v2c_rport: # trap_v2c_status: # snmp_sysinfo: # contact_info: # description: # engine_id: # location: # status: # snmp_trap_threshold: # trap_high_cpu_threshold: # trap_log_full_threshold: # trap_low_memory_threshold: # snmp_user: # - auth_proto: # auth_pwd: # name: # priv_proto: # priv_pwd: # queries: # query_port: # security_level: # staged_image_version: # static_mac: # - description: # id: # interface: # mac: # type: # vlan: # storm_control: # broadcast: # local_override: # rate: # unknown_multicast: # unknown_unicast: # burst_size_level: # stp_instance: # - id: # priority: # stp_settings: # forward_time: # hello_time: # local_override: # max_age: # max_hops: # name: # pending_timer: # revision: # status: # switch_device_tag: # switch_dhcp_opt43_key: # switch_log: # local_override: # severity: # status: # switch_profile: # tdr_supported: # tunnel_discovered: # type: # version: # vlan: # - assignment_priority: # vlan_name: # name: # poe_lldp_detection: # router_static: # - blackhole: # comment: # device: # distance: # dst: # dynamic_gateway: # gateway: # id: # status: # switch_id: # vrf: # router_vrf: # - name: # switch_id: # vrfid: # system_dhcp_server: # - default_gateway: # dns_server1: # dns_server2: # dns_server3: # dns_service: # id: # interface: # ip_range: # - end_ip: # id: # start_ip: # lease_time: # netmask: # ntp_server1: # ntp_server2: # ntp_server3: # ntp_service: # options: # - code: # id: # ip: # type: # value: # status: # switch_id: # system_interface: # - allowaccess: # - "https" # - "ping" # - "ssh" # - "snmp" # - "http" # - "telnet" # - "radius-acct" # interface: # ip: # mode: # name: # status: # switch_id: # type: # vlan: # vrf: # max_poe_budget: 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
  • meta - The result of the request.returned: always type: dict
    • request_url - The full url requested. returned: always type: str sample: /sys/login/user
    • response_code - The status of api request. returned: always type: int sample: 0
    • response_data - The data body of the api response. returned: optional type: list or dict
    • response_message - The descriptive message of the api response. returned: always type: str sample: OK
    • system_information - The information of the target system. returned: always type: dict
  • rc - The status the request. returned: always type: int sample: 0
  • version_check_warning - Warning if the parameters used in the playbook are not supported by the current FortiManager version. returned: if at least one parameter not supported by the current FortiManager version type: list
Status ------ - This module is not guaranteed to have a backwards compatible interface. Authors ------- - Xinwei Du (@dux-fortinet) - Xing Li (@lix-fortinet) - Jie Xue (@JieX19) - Link Zheng (@chillancezen) - Frank Shen (@fshen01) - Hongbin Lu (@fgtdev-hblu)