Improve vmware_portgroup_facts module (#47357)

This commit is contained in:
Christian Kotte 2018-11-26 15:27:49 +01:00 committed by ansibot
parent be55abafe1
commit 1ed9e72dc3
2 changed files with 143 additions and 40 deletions

View file

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