diff options
author | Tim Rightnour <root@garbled.net> | 2017-11-19 15:52:38 +0100 |
---|---|---|
committer | Abhijeet Kasurde <akasurde@redhat.com> | 2017-11-19 15:52:38 +0100 |
commit | 5962337332c47ff19e7809259b899e89a7d8dcf2 (patch) | |
tree | 287c43e25b3bb311b32968bb442a7ff2ed5f2df9 /test/integration/targets/vmware_guest_facts | |
parent | Fix typo in usage of encrypt_string command (#32961) (diff) | |
download | ansible-5962337332c47ff19e7809259b899e89a7d8dcf2.tar.xz ansible-5962337332c47ff19e7809259b899e89a7d8dcf2.zip |
Add additional facts to the fact gathering of vmware (#31632)
Adds facts about datastores, esxi_host, vm files, ha state, question, is_template, consolidation status and hw_files. Also, adds integration tests for vmware fact enhancement.
Diffstat (limited to 'test/integration/targets/vmware_guest_facts')
-rw-r--r-- | test/integration/targets/vmware_guest_facts/tasks/main.yml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/integration/targets/vmware_guest_facts/tasks/main.yml b/test/integration/targets/vmware_guest_facts/tasks/main.yml index 3edcf7dc08..37540b56ab 100644 --- a/test/integration/targets/vmware_guest_facts/tasks/main.yml +++ b/test/integration/targets/vmware_guest_facts/tasks/main.yml @@ -42,6 +42,13 @@ - set_fact: dc1="{{ datacenters['json'][0] }}" +- name: get a list of hosts from vcsim + uri: + url: http://{{ vcsim }}:5000/govc_find?filter=H + register: hosts + +- set_fact: h1="{{ hosts['json'][0] }}" + - name: get a list of virtual machines from vcsim uri: url: http://{{ vcsim }}:5000/govc_find?filter=VM @@ -68,6 +75,8 @@ - "guest_facts_0001['instance']['hw_name'] == vm1 | basename" - "guest_facts_0001['instance']['hw_product_uuid'] is defined" - "guest_facts_0001['instance']['hw_cores_per_socket'] is defined" + - "guest_facts_0001['instance']['hw_datastores'] is defined" + - "guest_facts_0001['instance']['hw_esxi_host'] == h1 | basename" - set_fact: vm1_uuid="{{ guest_facts_0001['instance']['hw_product_uuid'] }}" @@ -154,3 +163,4 @@ - "guest_facts_0004['instance']['snapshots'][0]['name'] == 'snap1'" - "guest_facts_0004['instance']['snapshots'][1]['name'] == 'snap2'" - "guest_facts_0004['instance']['current_snapshot']['name'] == 'snap2'" + - "guest_facts_0002['instance']['hw_folder'] == vm1 | dirname" |