Hey all,
I’m new to Ansible but I’m really liking it so far. However, I think what I’m trying to do is a bit more advanced, or perhaps Ansible isn’t the right tool? Here is the problem:
Currently I have several datacenters with a varying amount of clusters on each. On the clusters are some ESXi hosts with some vSwitches. These vSwitches are configured with Vlans and other things. I would like to manage these with Ansible. The goal would ideally be to (within a single cluster) make sure all the vSwitches on each host are running the same config. I.e. vSwitch1 on someServer01 has the same configuration as vSwitch1 on someServer02 within someCluster. Currently some of the portgroups get messed up between hosts, usually some vSwitches will be missing a Vlan, or maybe have the right number of Vlans but use the wrong number scheme. I would like to designate one portgroup as the “right one” and merely copy this config to the other vSwitches.
I have read the documentation under http://docs.ansible.com/ansible/list_of_cloud_modules.html#vmware and looked at the vmware_portgroup and the vmware_dvs_portgroup modules, however these seem to only deal with explicitly creating/removing portgroups. Is there a way I could see the configuration of a portgroup, or even look at an existing vSwitch?
If someone could point me in the right direction, that would be awesome. Thanks!