|
|
|
@ -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
|
|
|
|
|