vmware_dvs_portgroup_info – Gathers info DVS portgroup configurations¶
New in version 2.9.
Synopsis¶
This module can be used to gather information about DVS portgroup configurations.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
Notes¶
Note
Tested on vSphere 6.5
Examples¶
- name: Get info about DVPG
vmware_dvs_portgroup_info:
hostname: "{{ vcenter_server }}"
username: "{{ vcenter_user }}"
password: "{{ vcenter_pass }}"
validate_certs: no
datacenter: "{{ datacenter_name }}"
register: dvpg_info
- name: Get number of ports for portgroup 'dvpg_001' in 'dvs_001'
debug:
msg: "{{ item.num_ports }}"
with_items:
- "{{ dvpg_info.dvs_portgroup_info['dvs_001'] | json_query(query) }}"
vars:
query: "[?portgroup_name=='dvpg_001']"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]