VMware: Add check mode support in vmware_vswitch_facts (#47263)

* Check mode support
* Fixed num_ports
This commit is contained in:
Christian Kotte 2018-10-28 15:30:51 +01:00 committed by Abhijeet Kasurde
parent 3568dc512a
commit d052618838
2 changed files with 37 additions and 6 deletions

View file

@ -59,3 +59,19 @@
- assert:
that:
- switch_facts.hosts_vswitch_facts is defined
- name: Gather vswitch facts about all hosts in given cluster in check mode
vmware_vswitch_facts:
hostname: "{{ vcsim }}"
username: "{{ user }}"
password: "{{ passwd }}"
esxi_hostname: "{{ host1 }}"
validate_certs: no
register: switch_facts_check_mode
check_mode: yes
- debug: var=switch_facts_check_mode
- assert:
that:
- switch_facts_check_mode.hosts_vswitch_facts is defined