mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
6bb21c3db0
- In order to keep the integration with `ansible-test`, we prefer to avoid any interaction with the Ansible inventory file. - split up the prepare_vmware_tests/defaults/main.yml in two configuration files: one for vcsim and one for a real environment - remove all the access to hostvars - directly interact with the ESXi to mount/umount the datastore https://github.com/ansible/ansible/pull/56516 - record the virtual machine folder in the environment configuration - vmware_guest_move: Use https://github.com/ansible/ansible/pull/55237
36 lines
864 B
YAML
36 lines
864 B
YAML
---
|
|
- name: load vars
|
|
include_vars:
|
|
file: vcsim.yml
|
|
|
|
- name: kill vcsim
|
|
uri:
|
|
url: http://{{ vcsim }}:5000/killall
|
|
|
|
- name: start vcsim (all dressed)
|
|
uri:
|
|
url: http://{{ vcsim }}:5000/spawn?cluster=1&folder=1&ds=2
|
|
register: vcsim_instance
|
|
when: setup_esxi_instance is not defined
|
|
|
|
- name: start vcsim (ESXi only)
|
|
uri:
|
|
url: http://{{ vcsim }}:5000/spawn?esx=1
|
|
register: vcsim_instance
|
|
when: setup_esxi_instance is defined
|
|
|
|
# - name: get a list of Hosts from vcsim
|
|
# uri:
|
|
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
|
# register: vcsim_host_list
|
|
|
|
# - name: get a list of Hosts from vcsim
|
|
# uri:
|
|
# url: http://{{ vcsim }}:5000/govc_find?filter=F
|
|
# register: vcsim_host_folder
|
|
# - debug: var=vcsim_host_folder
|
|
|
|
- set_fact:
|
|
vcenter_hostname: "{{ vcsim }}"
|
|
vcenter_username: "user"
|
|
vcenter_password: "pass"
|