mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 15:21:25 -07:00
VMware: Add check mode support in vmware_vswitch_facts (#47263)
* Check mode support * Fixed num_ports
This commit is contained in:
parent
3568dc512a
commit
d052618838
2 changed files with 37 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue