Documentation

vmware_portgroup - Create a VMware portgroup

New in version 2.0.

Synopsis

Create a VMware portgroup

Requirements (on host that executes module)

  • python >= 2.6
  • PyVmomi

Options

parameter required default choices comments
hostname
yes
    The hostname or IP address of the vSphere vCenter
    password
    yes
      The password of the vSphere vCenter

      aliases: pass, pwd
      portgroup_name
      yes
        Portgroup name to add
        switch_name
        yes
          vSwitch to modify
          username
          yes
            The username of the vSphere vCenter

            aliases: user, admin
            vlan_id
            yes
              VLAN ID to assign to portgroup

              Examples

              Example from Ansible playbook
              
                  - name: Add Management Network VM Portgroup
                    local_action:
                      module: vmware_portgroup
                      hostname: esxi_hostname
                      username: esxi_username
                      password: esxi_password
                      switch_name: vswitch_name
                      portgroup_name: portgroup_name
                      vlan_id: vlan_id
              

              Notes

              Note

              Tested on vSphere 5.5

              This is an Extras Module

              For more information on what this means please read Extras Modules

              For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.