mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-10 11:11:29 -07:00
VMware: new module: vmware_guest_customization_facts (#38588)
This module gathers facts about customization specification created for virtual machine. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
e729ad56a0
commit
1a8332d2cd
3 changed files with 238 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
cloud/vcenter
|
||||
unsupported
|
|
@ -0,0 +1,44 @@
|
|||
# Test code for the vmware_guest_customization_facts module.
|
||||
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
# TODO: vcsim does not support customizationspecmanager related functionalities
|
||||
|
||||
- name: Wait for Flask controller to come up online
|
||||
wait_for:
|
||||
host: "{{ vcsim }}"
|
||||
port: 5000
|
||||
state: started
|
||||
|
||||
- name: kill vcsim
|
||||
uri:
|
||||
url: http://{{ vcsim }}:5000/killall
|
||||
|
||||
- name: start vcsim with no folders
|
||||
uri:
|
||||
url: http://{{ vcsim }}:5000/spawn?datacenter=1&cluster=1&folder=1
|
||||
register: vcsim_instance
|
||||
|
||||
- name: Wait for Flask controller to come up online
|
||||
wait_for:
|
||||
host: "{{ vcsim }}"
|
||||
port: 443
|
||||
state: started
|
||||
|
||||
- debug: var=vcsim_instance
|
||||
- debug: var=vmlist
|
||||
|
||||
- name: Gather facts about given customization spec
|
||||
vmware_guest_customization_facts:
|
||||
validate_certs: False
|
||||
hostname: "{{ vcsim }}"
|
||||
username: "{{ vcsim_instance['json']['username'] }}"
|
||||
password: "{{ vcsim_instance['json']['password'] }}"
|
||||
spec_name: sample_spec
|
||||
register: vm_custom_spec_facts
|
||||
|
||||
- debug: var=vm_custom_spec_facts
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "not vm_custom_spec_facts.changed"
|
Loading…
Add table
Add a link
Reference in a new issue