community.vmware.vmware_dvswitch_info – Gathers info dvswitch configurations¶
Note
This plugin is part of the community.vmware collection (version 1.7.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_dvswitch_info
.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
PyVmomi
Parameters¶
Examples¶
- name: Gather all registered dvswitch
community.vmware.vmware_dvswitch_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
delegate_to: localhost
register: dvswitch_info
- name: Gather info about specific dvswitch
community.vmware.vmware_dvswitch_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
switch_name: DVSwitch01
delegate_to: localhost
register: dvswitch_info
- name: Gather info from folder about specific dvswitch
community.vmware.vmware_dvswitch_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
folder: /datacenter1/network/F01
switch_name: DVSwitch02
delegate_to: localhost
register: dvswitch_info
- name: Gather some info from a dvswitch using the vSphere API output schema
community.vmware.vmware_dvswitch_info:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
schema: vsphere
properties:
- summary.name
- summary.numPorts
- config.maxMtu
- overallStatus
switch_name: DVSwitch01
register: dvswitch_info
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
sky-joker (@sky-joker)