summaryrefslogtreecommitdiff
path: root/test/integration/targets/vmware_host_config_facts
diff options
context:
space:
mode:
authorChristian Kotte <christian.kotte@gmx.de>2018-10-03 14:55:40 +0200
committerAbhijeet Kasurde <akasurde@redhat.com>2018-10-03 07:55:40 -0500
commit1589424c3e292a7ac12eb2e5fccd17548375d5b8 (patch)
treef385654c276f5c939011546bb60fc23d68122236 /test/integration/targets/vmware_host_config_facts
parent77fee07a882f7ef58a78ddeeee27269840c49b01 (diff)
downloadansible-1589424c3e292a7ac12eb2e5fccd17548375d5b8.tar.gz
VMware: Add check mode support in vmware_host_config_facts (#46272)
Diffstat (limited to 'test/integration/targets/vmware_host_config_facts')
-rw-r--r--test/integration/targets/vmware_host_config_facts/tasks/main.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/integration/targets/vmware_host_config_facts/tasks/main.yml b/test/integration/targets/vmware_host_config_facts/tasks/main.yml
index 9b89767db0..c89a11944a 100644
--- a/test/integration/targets/vmware_host_config_facts/tasks/main.yml
+++ b/test/integration/targets/vmware_host_config_facts/tasks/main.yml
@@ -80,3 +80,33 @@
assert:
that:
- single_hosts_result.hosts_facts
+
+- name: gather facts about all hosts in given cluster in check mode
+ vmware_host_config_facts:
+ hostname: "{{ vcsim }}"
+ username: "{{ vcsim_instance.json.username }}"
+ password: "{{ vcsim_instance.json.password }}"
+ validate_certs: no
+ cluster_name: "{{ ccr1 }}"
+ register: all_hosts_result_check_mode
+ check_mode: yes
+
+- name: ensure facts are gathered for all hosts
+ assert:
+ that:
+ - all_hosts_result_check_mode.hosts_facts
+
+- name: gather facts about a given host in check mode
+ vmware_host_config_facts:
+ hostname: "{{ vcsim }}"
+ username: "{{ vcsim_instance.json.username }}"
+ password: "{{ vcsim_instance.json.password }}"
+ validate_certs: no
+ esxi_hostname: "{{ host1 }}"
+ register: single_hosts_result_check_mode
+ check_mode: yes
+
+- name: ensure facts are gathered for all hosts
+ assert:
+ that:
+ - single_hosts_result_check_mode.hosts_facts