diff options
author | Gonéri Le Bouder <goneri@lebouder.net> | 2019-05-16 09:36:48 -0400 |
---|---|---|
committer | Gonéri Le Bouder <goneri@lebouder.net> | 2019-05-23 17:40:19 -0400 |
commit | 6bb21c3db0bbaaa31aef09b6e5971e83a1f016df (patch) | |
tree | fdae4329d2d7ead8a0afdfb7059b93cf7bcecb7f /test/integration/targets/vmware_drs_group | |
parent | 4adb7cfb5f5e04aca29c7fd95f52e48901629c86 (diff) | |
download | ansible-6bb21c3db0bbaaa31aef09b6e5971e83a1f016df.tar.gz |
vmware: test-refactoring
- In order to keep the integration with `ansible-test`, we prefer to avoid any
interaction with the Ansible inventory file.
- split up the prepare_vmware_tests/defaults/main.yml in two
configuration files: one for vcsim and one for a real environment
- remove all the access to hostvars
- directly interact with the ESXi to mount/umount the datastore
https://github.com/ansible/ansible/pull/56516
- record the virtual machine folder in the environment configuration
- vmware_guest_move: Use https://github.com/ansible/ansible/pull/55237
Diffstat (limited to 'test/integration/targets/vmware_drs_group')
-rw-r--r-- | test/integration/targets/vmware_drs_group/tasks/main.yml | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/integration/targets/vmware_drs_group/tasks/main.yml b/test/integration/targets/vmware_drs_group/tasks/main.yml index 7dec87f23b..071f9c0719 100644 --- a/test/integration/targets/vmware_drs_group/tasks/main.yml +++ b/test/integration/targets/vmware_drs_group/tasks/main.yml @@ -19,9 +19,7 @@ cluster_name: '{{ ccr1 }}' datacenter_name: '{{ dc1 }}' group_name: TEST_VM_01 - vms: - - DC0_C0_RP0_VM0 - - DC0_C0_RP0_VM1 + vms: "{{ virtual_machines_in_cluster | map(attribute='name') | list }}" state: present register: drs_vm_group_01_results @@ -32,7 +30,7 @@ that: - "drs_vm_group_01_results.changed" -- when: vcsim is defined or groups['esxi-lab'] | length >= 3 +- when: vcsim is defined or esxi_hosts | length >= 3 block: - name: Create DRS Host group vmware_drs_group: @@ -43,7 +41,7 @@ cluster_name: '{{ ccr1 }}' datacenter_name: '{{ dc1 }}' group_name: TEST_HOST_01 - hosts: "{{ groups['esxi-lab'][0:3] }}" + hosts: "{{ esxi_hosts[0:3] }}" state: present register: drs_host_group_01_results |