From 4869874337bcb68154f8c29db12cfcd3d7281892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Thu, 11 Jun 2020 12:21:44 -0400 Subject: [PATCH] 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. --- .../incidental_vmware_prepare_tests/tasks/init_vcsim.yml | 4 ++++ test/lib/ansible_test/_internal/cloud/vcenter.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/integration/targets/incidental_vmware_prepare_tests/tasks/init_vcsim.yml b/test/integration/targets/incidental_vmware_prepare_tests/tasks/init_vcsim.yml index bfb9ef6db7d..601bd5aad88 100644 --- a/test/integration/targets/incidental_vmware_prepare_tests/tasks/init_vcsim.yml +++ b/test/integration/targets/incidental_vmware_prepare_tests/tasks/init_vcsim.yml @@ -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 diff --git a/test/lib/ansible_test/_internal/cloud/vcenter.py b/test/lib/ansible_test/_internal/cloud/vcenter.py index 59b9fe05bf7..37cfa6d5e6b 100644 --- a/test/lib/ansible_test/_internal/cloud/vcenter.py +++ b/test/lib/ansible_test/_internal/cloud/vcenter.py @@ -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'],