ansible-test: vcenter initialize group/vmware (#70011)

Ensure the vcenter provider initialize the `module_defaults` of all
the vmware modules, not just `vmware_guest`.
The VMware CI relies on this for the authentication of the different
VMware modules.

The commit adjust `incidental_vmware_prepare_tests/tasks/init_vcsim.yml`.
The test-suite uses a copy of `vmware_guest` that is not in the
`group/vmware` group. As a result, we need to manually pass the
authentification parameter.
This commit is contained in:
Gonéri Le Bouder 2020-06-11 12:21:44 -04:00 committed by GitHub
parent ebb22655e4
commit 4869874337
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -40,5 +40,9 @@
vmware_guest:
name: "{{ item.name }}"
state: poweredoff
validate_certs: False
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
with_items: "{{ virtual_machines + virtual_machines_in_cluster }}"
register: poweroff_d1_c1_f0

View file

@ -220,7 +220,7 @@ class VcenterEnvironment(CloudEnvironment):
env_vars=env_vars,
ansible_vars=ansible_vars,
module_defaults={
'vmware_guest': {
'group/vmware': {
'hostname': ansible_vars['vcenter_hostname'],
'username': ansible_vars['vcenter_username'],
'password': ansible_vars['vcenter_password'],