community.vmware.vmware_dvswitch_pvlans – Manage Private VLAN configuration of a Distributed Switch¶
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_pvlans
.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
Examples¶
- name: Create PVLANs on a Distributed Switch
community.vmware.vmware_dvswitch_pvlans:
hostname: '{{ inventory_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
switch: dvSwitch
primary_pvlans:
- primary_pvlan_id: 1
- primary_pvlan_id: 4
secondary_pvlans:
- primary_pvlan_id: 1
secondary_pvlan_id: 2
pvlan_type: isolated
- primary_pvlan_id: 1
secondary_pvlan_id: 3
pvlan_type: community
- primary_pvlan_id: 4
secondary_pvlan_id: 5
pvlan_type: community
delegate_to: localhost
- name: Create primary PVLAN and secondary promiscuous PVLAN on a Distributed Switch
community.vmware.vmware_dvswitch_pvlans:
hostname: '{{ inventory_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
switch: dvSwitch
primary_pvlans:
- primary_pvlan_id: 1
delegate_to: localhost
- name: Remove all PVLANs from a Distributed Switch
community.vmware.vmware_dvswitch_pvlans:
hostname: '{{ inventory_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
switch: dvSwitch
primary_pvlans: []
secondary_pvlans: []
delegate_to: localhost
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Christian Kotte (@ckotte)