1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

VMware: Add check mode support to vmware_vmkernel_facts (#47286)

This commit is contained in:
Christian Kotte 2018-10-19 15:54:34 +02:00 committed by Abhijeet Kasurde
parent 0f943f7584
commit dc2eb05491
2 changed files with 19 additions and 2 deletions

View file

@ -189,7 +189,8 @@ def main():
argument_spec=argument_spec,
required_one_of=[
['cluster_name', 'esxi_hostname'],
]
],
supports_check_mode=True
)
vmware_vmk_config = VmkernelFactsManager(module)

View file

@ -45,7 +45,7 @@
- debug: var=host1
- name: Gather VNICs facts about all hosts in given cluster
- name: Gather VMkernel facts about all hosts in given cluster
vmware_vmkernel_facts:
hostname: "{{ vcsim }}"
username: "{{ user }}"
@ -59,3 +59,19 @@
- assert:
that:
- host_vmkernel.host_vmk_facts is defined
- name: Gather VMkernel facts about all hosts in given cluster in check mode
vmware_vmkernel_facts:
hostname: "{{ vcsim }}"
username: "{{ user }}"
password: "{{ passwd }}"
esxi_hostname: "{{ host1 }}"
validate_certs: no
register: host_vmkernel_check_mode
check_mode: yes
- debug: var=host_vmkernel
- assert:
that:
- host_vmkernel_check_mode.host_vmk_facts is defined