ansible-collections / community.vmware

Ansible Collection for VMware
GNU General Public License v3.0
349 stars 338 forks source link

community.vmware.vmware_vswitch - add CDP configuration #1021

Open markatdxb opened 3 years ago

markatdxb commented 3 years ago
SUMMARY

Would be great if you could add the module parameter to set the Link discovery configuration on the vSwitch

ISSUE TYPE
COMPONENT NAME

vmware_vswitch

ADDITIONAL INFORMATION

As far as i know currently there is no way to set the CDP settings via API or any other module ? I have to use following PS code

    Connect-VIServer -Server {{ esx_server_fqdn }} -User root -Password {{ password }} -Force | Out-null
    $esxcli = Get-EsxCli -V2
    $arg = $esxcli.network.vswitch.standard.set.CreateArgs()
    $arg.vswitchname = "vSwitch0"
    $arg.cdpstatus = "both"
    $esxcli.network.vswitch.standard.set.Invoke($arg)
ansibullbot commented 3 years ago

Files identified in the description: None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help