The use of the `hostvars[esxi1].ansible_host` was attempt to use
different hostname and IP address. But it's actually the source of
more problems.
VMware expects to be able to resolvable the host name. This means, that
if someone wants to run the test-suite, s/he needs to use a DNS or
update the `/etc/hosts` files on the different hosts.
Refactoring of the following roles to make use of the new
`prepare_vmware_tests` role.
- `vmware_drs_group`
- `vmware_drs_group_facts`
- `vmware_drs_rule_facts`
- `vmware_drs_portgroup`
- `vmware_drs_portgroup_facts`
- `vmware_dvs_portgroup_facts`
- `vmware_dvswitch`
- `vmware_dvswitch_pvlans`
This patch depends on: https://github.com/ansible/ansible/pull/55719
Original PR: https://github.com/ansible/ansible/pull/54882
The vmware test roles do a lot of similar operation to prepare
the environment. This role will be used to reduce the amount of
duplicated code.
The role can prepare an environment on a baremetal environment, this
in addition to vcsim.
Original PR: https://github.com/ansible/ansible/pull/54882