mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-09 14:50:02 -07:00
Improve vmware_portgroup_facts module (#47357)
This commit is contained in:
parent
be55abafe1
commit
1ed9e72dc3
2 changed files with 143 additions and 40 deletions
|
@ -67,7 +67,7 @@
|
|||
- "not portgroup_0001_results.changed"
|
||||
- "portgroup_0001_results.hosts_portgroup_facts is defined"
|
||||
|
||||
- name: Gather firewall facts for ESXi host
|
||||
- name: Gather portgroup facts for an ESXi host
|
||||
vmware_portgroup_facts:
|
||||
hostname: "{{ vcsim }}"
|
||||
username: "{{ vcsim_instance.json.username }}"
|
||||
|
@ -80,3 +80,34 @@
|
|||
that:
|
||||
- "not portgroup_0002_results.changed"
|
||||
- "portgroup_0002_results.hosts_portgroup_facts is defined"
|
||||
|
||||
- name: Gather all portgroup facts for an ESXi host
|
||||
vmware_portgroup_facts:
|
||||
hostname: "{{ vcsim }}"
|
||||
username: "{{ vcsim_instance.json.username }}"
|
||||
password: "{{ vcsim_instance.json.password }}"
|
||||
validate_certs: no
|
||||
esxi_hostname: "{{ host1 }}"
|
||||
policies: true
|
||||
register: portgroup_0003_results
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "not portgroup_0003_results.changed"
|
||||
- "portgroup_0003_results.hosts_portgroup_facts is defined"
|
||||
|
||||
- name: Gather all portgroup facts for an ESXi host in check mode
|
||||
vmware_portgroup_facts:
|
||||
hostname: "{{ vcsim }}"
|
||||
username: "{{ vcsim_instance.json.username }}"
|
||||
password: "{{ vcsim_instance.json.password }}"
|
||||
validate_certs: no
|
||||
esxi_hostname: "{{ host1 }}"
|
||||
policies: true
|
||||
register: portgroup_0004_results
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "not portgroup_0004_results.changed"
|
||||
- "portgroup_0004_results.hosts_portgroup_facts is defined"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue