mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-25 16:06:43 +00:00
Improve vmware_portgroup_facts module (#47357)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user