mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Mark unsupported vmware tests.
This commit is contained in:
parent
c36aa6ae50
commit
8e6fd48087
38 changed files with 1397 additions and 1390 deletions
|
@ -1,4 +1,4 @@
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
destructive
|
destructive
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
disabled
|
unsupported
|
||||||
|
|
|
@ -4,106 +4,106 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support datastore maintenance mode properties
|
# TODO: vcsim does not support datastore maintenance mode properties
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?datacenter=1&cluster=1&folder=0
|
url: http://{{ vcsim }}:5000/spawn?datacenter=1&cluster=1&folder=0
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: Get a list of datastores from vcsim
|
- name: Get a list of datastores from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=D
|
url: http://{{ vcsim }}:5000/govc_find?filter=D
|
||||||
# register: datastores
|
register: datastores
|
||||||
|
|
||||||
#- name: Enter datastore in maintenance mode
|
- name: Enter datastore in maintenance mode
|
||||||
# vmware_datastore_maintenancemode:
|
vmware_datastore_maintenancemode:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# state: present
|
state: present
|
||||||
# datastore: "{{ item | basename }}"
|
datastore: "{{ item | basename }}"
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# with_items: "{{ datastores['json'] }}"
|
with_items: "{{ datastores['json'] }}"
|
||||||
# register: test_result_0001
|
register: test_result_0001
|
||||||
|
|
||||||
#- debug: var=test_result_0001
|
- debug: var=test_result_0001
|
||||||
|
|
||||||
#- name: assert that changes were made
|
- name: assert that changes were made
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - "test_result_0001.results|map(attribute='changed')|unique|list == [true]"
|
- "test_result_0001.results|map(attribute='changed')|unique|list == [true]"
|
||||||
|
|
||||||
#- name: Enter datastore in maintenance mode again
|
- name: Enter datastore in maintenance mode again
|
||||||
# vmware_datastore_maintenancemode:
|
vmware_datastore_maintenancemode:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# state: present
|
state: present
|
||||||
# datastore: "{{ item | basename }}"
|
datastore: "{{ item | basename }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# with_items: "{{ datastores['json'] }}"
|
with_items: "{{ datastores['json'] }}"
|
||||||
# register: test_result_0002
|
register: test_result_0002
|
||||||
|
|
||||||
#- debug: var=test_result_0002
|
- debug: var=test_result_0002
|
||||||
|
|
||||||
#- name: assert that no changes were made
|
- name: assert that no changes were made
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - "test_result_0002.results|map(attribute='changed')|unique|list == [false]"
|
- "test_result_0002.results|map(attribute='changed')|unique|list == [false]"
|
||||||
|
|
||||||
#- name: Exit datastores from maintenance mode
|
- name: Exit datastores from maintenance mode
|
||||||
# vmware_datastore_maintenancemode:
|
vmware_datastore_maintenancemode:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# state: absent
|
state: absent
|
||||||
# esxi_hostname: "{{ item | basename }}"
|
esxi_hostname: "{{ item | basename }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# with_items: "{{ datastores['json'] }}"
|
with_items: "{{ datastores['json'] }}"
|
||||||
# register: test_result_0003
|
register: test_result_0003
|
||||||
|
|
||||||
#- debug: var=test_result_0003
|
- debug: var=test_result_0003
|
||||||
|
|
||||||
#- name: assert that changes were made
|
- name: assert that changes were made
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - "test_result_0003.results|map(attribute='changed')|unique|list == [true]"
|
- "test_result_0003.results|map(attribute='changed')|unique|list == [true]"
|
||||||
|
|
||||||
#- name: Exit datastores from maintenance mode again
|
- name: Exit datastores from maintenance mode again
|
||||||
# vmware_datastore_maintenancemode:
|
vmware_datastore_maintenancemode:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# state: absent
|
state: absent
|
||||||
# esxi_hostname: "{{ item | basename }}"
|
esxi_hostname: "{{ item | basename }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# with_items: "{{ datastores['json'] }}"
|
with_items: "{{ datastores['json'] }}"
|
||||||
# register: test_result_0004
|
register: test_result_0004
|
||||||
|
|
||||||
#- debug: var=test_result_0004
|
- debug: var=test_result_0004
|
||||||
|
|
||||||
#- name: assert that no changes were made
|
- name: assert that no changes were made
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - "test_result_0004.results|map(attribute='changed')|unique|list == [false]"
|
- "test_result_0004.results|map(attribute='changed')|unique|list == [false]"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
|
unsupported
|
||||||
|
|
|
@ -3,52 +3,52 @@
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
|
|
||||||
# TODO: vcsim does not support disk information
|
# TODO: vcsim does not support disk information
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
#
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
#- name: start vcsim with no folders
|
- name: start vcsim with no folders
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?datacenter=1&cluster=1&folder=0
|
url: http://{{ vcsim }}:5000/spawn?datacenter=1&cluster=1&folder=0
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
#
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
#
|
|
||||||
#- name: get a list of VMS from vcsim
|
- name: get a list of VMS from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=VM
|
url: http://{{ vcsim }}:5000/govc_find?filter=VM
|
||||||
# register: vmlist
|
register: vmlist
|
||||||
#
|
|
||||||
#- debug: var=vcsim_instance
|
- debug: var=vcsim_instance
|
||||||
#
|
|
||||||
#- debug: var=vmlist
|
- debug: var=vmlist
|
||||||
#
|
|
||||||
#- set_fact:
|
- set_fact:
|
||||||
# vm1: "{{ vmlist['json'][0] }}"
|
vm1: "{{ vmlist['json'][0] }}"
|
||||||
#
|
|
||||||
#- debug: var=vm1
|
- debug: var=vm1
|
||||||
#
|
|
||||||
#- name: create new VMs with non-existent network
|
- name: create new VMs with non-existent network
|
||||||
# vmware_guest_disk_facts:
|
vmware_guest_disk_facts:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# name: "{{ vm1 }}"
|
name: "{{ vm1 }}"
|
||||||
# datacenter: "{{ (vm1 | basename).split('_')[0] }}"
|
datacenter: "{{ (vm1 | basename).split('_')[0] }}"
|
||||||
# register: disk_facts
|
register: disk_facts
|
||||||
#- debug: var=disk_facts
|
- debug: var=disk_facts
|
||||||
#
|
|
||||||
#- name: assert that no changes were made
|
- name: assert that no changes were made
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - "not disk_facts.changed"
|
- "not disk_facts.changed"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
destructive
|
destructive
|
||||||
|
unsupported
|
||||||
|
|
|
@ -1,230 +1,230 @@
|
||||||
# - name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
# - debug: var=vcsim
|
- debug: var=vcsim
|
||||||
#
|
|
||||||
# - name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
#
|
|
||||||
# - name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: "{{ 'http://' + vcsim + ':5000/killall' }}"
|
url: "{{ 'http://' + vcsim + ':5000/killall' }}"
|
||||||
# - name: start vcsim with no folders
|
- name: start vcsim with no folders
|
||||||
# uri:
|
uri:
|
||||||
# url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=1' }}"
|
url: "{{ 'http://' + vcsim + ':5000/spawn?datacenter=1&cluster=1&folder=1' }}"
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
#
|
|
||||||
# - name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
#
|
|
||||||
# - name: get a list of VMS from vcsim
|
- name: get a list of VMS from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}"
|
url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}"
|
||||||
# register: vmlist
|
register: vmlist
|
||||||
#
|
|
||||||
# - set_fact:
|
- set_fact:
|
||||||
# vm1: "{{ vmlist['json'][0] }}"
|
vm1: "{{ vmlist['json'][0] }}"
|
||||||
#
|
|
||||||
# - name: get a list of datacenters from vcsim
|
- name: get a list of datacenters from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=DC' }}"
|
url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=DC' }}"
|
||||||
# register: datacenters
|
register: datacenters
|
||||||
#
|
|
||||||
# - set_fact:
|
- set_fact:
|
||||||
# dc1: "{{ datacenters['json'][0] }}"
|
dc1: "{{ datacenters['json'][0] }}"
|
||||||
#
|
|
||||||
# - debug: var=vcsim_instance
|
- debug: var=vcsim_instance
|
||||||
# - debug: var=vmlist
|
- debug: var=vmlist
|
||||||
# - debug: var=vm1
|
- debug: var=vm1
|
||||||
# - debug: var=dc1
|
- debug: var=dc1
|
||||||
#
|
|
||||||
# # Test0001: Try to delete the non-existent snapshot
|
# Test0001: Try to delete the non-existent snapshot
|
||||||
# - name: 0001 - Delete non-existent snapshot
|
- name: 0001 - Delete non-existent snapshot
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# folder: "{{ vm1 | dirname }}"
|
folder: "{{ vm1 | dirname }}"
|
||||||
# name: "{{ vm1 | basename }}"
|
name: "{{ vm1 | basename }}"
|
||||||
# state: absent
|
state: absent
|
||||||
# snapshot_name: snap_a
|
snapshot_name: snap_a
|
||||||
#
|
|
||||||
# # Test0002: Create two snapshots
|
# Test0002: Create two snapshots
|
||||||
# - name: 0002 - Create snapshot
|
- name: 0002 - Create snapshot
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# folder: "{{ vm1 | dirname }}"
|
folder: "{{ vm1 | dirname }}"
|
||||||
# name: "{{ vm1 | basename }}"
|
name: "{{ vm1 | basename }}"
|
||||||
# state: present
|
state: present
|
||||||
# snapshot_name: "snap_{{item}}"
|
snapshot_name: "snap_{{item}}"
|
||||||
# description: "snap named {{item}}"
|
description: "snap named {{item}}"
|
||||||
# with_items:
|
with_items:
|
||||||
# - a
|
- a
|
||||||
# - b
|
- b
|
||||||
#
|
|
||||||
# # Test0003: Reanme a to c
|
# Test0003: Reanme a to c
|
||||||
# - name: 0003 - Rename snapshot
|
- name: 0003 - Rename snapshot
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# folder: "{{ vm1 | dirname }}"
|
folder: "{{ vm1 | dirname }}"
|
||||||
# name: "{{ vm1 | basename }}"
|
name: "{{ vm1 | basename }}"
|
||||||
# state: present
|
state: present
|
||||||
# snapshot_name: snap_a
|
snapshot_name: snap_a
|
||||||
# new_snapshot_name: snap_c
|
new_snapshot_name: snap_c
|
||||||
#
|
|
||||||
# # Test0004: Create snap_a again
|
# Test0004: Create snap_a again
|
||||||
# - name: 0004 - Re-create snapshot a
|
- name: 0004 - Re-create snapshot a
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# folder: "{{ vm1 | dirname }}"
|
folder: "{{ vm1 | dirname }}"
|
||||||
# name: "{{ vm1 | basename }}"
|
name: "{{ vm1 | basename }}"
|
||||||
# state: present
|
state: present
|
||||||
# snapshot_name: snap_a
|
snapshot_name: snap_a
|
||||||
# description: "snap named a"
|
description: "snap named a"
|
||||||
#
|
|
||||||
# # Test0005: Change description of snap_c
|
# Test0005: Change description of snap_c
|
||||||
# - name: 0005 - Change description of snap_c
|
- name: 0005 - Change description of snap_c
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# folder: "{{ vm1 | dirname }}"
|
folder: "{{ vm1 | dirname }}"
|
||||||
# name: "{{ vm1 | basename }}"
|
name: "{{ vm1 | basename }}"
|
||||||
# state: present
|
state: present
|
||||||
# snapshot_name: snap_c
|
snapshot_name: snap_c
|
||||||
# new_description: "renamed to snap_c from snap_a"
|
new_description: "renamed to snap_c from snap_a"
|
||||||
#
|
|
||||||
# # Test0006: Delete snap_b with child remove
|
# Test0006: Delete snap_b with child remove
|
||||||
# - name: 0006 - Delete snap_b with child remove
|
- name: 0006 - Delete snap_b with child remove
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# folder: "{{ vm1 | dirname }}"
|
folder: "{{ vm1 | dirname }}"
|
||||||
# name: "{{ vm1 | basename }}"
|
name: "{{ vm1 | basename }}"
|
||||||
# state: absent
|
state: absent
|
||||||
# snapshot_name: snap_b
|
snapshot_name: snap_b
|
||||||
# remove_children: True
|
remove_children: True
|
||||||
#
|
|
||||||
# # Test0007: Delete all snapshots
|
# Test0007: Delete all snapshots
|
||||||
# - name: 0007 - Delete all snapshots
|
- name: 0007 - Delete all snapshots
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# folder: "{{ vm1 | dirname }}"
|
folder: "{{ vm1 | dirname }}"
|
||||||
# name: "{{ vm1 | basename }}"
|
name: "{{ vm1 | basename }}"
|
||||||
# state: remove_all
|
state: remove_all
|
||||||
#
|
|
||||||
# # Test0008: Create snap_a again and revert to it
|
# Test0008: Create snap_a again and revert to it
|
||||||
# - name: 0008 - Re-create snapshot a
|
- name: 0008 - Re-create snapshot a
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# folder: "{{ vm1 | dirname }}"
|
folder: "{{ vm1 | dirname }}"
|
||||||
# name: "{{ vm1 | basename }}"
|
name: "{{ vm1 | basename }}"
|
||||||
# state: present
|
state: present
|
||||||
# snapshot_name: snap_a
|
snapshot_name: snap_a
|
||||||
# description: "snap named a"
|
description: "snap named a"
|
||||||
#
|
|
||||||
# - name: 0008 - Revert to snap_a
|
- name: 0008 - Revert to snap_a
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# folder: "{{ vm1 | dirname }}"
|
folder: "{{ vm1 | dirname }}"
|
||||||
# name: "{{ vm1 | basename }}"
|
name: "{{ vm1 | basename }}"
|
||||||
# state: revert
|
state: revert
|
||||||
# snapshot_name: snap_a
|
snapshot_name: snap_a
|
||||||
#
|
|
||||||
# # Test0009: Create snap_a and check in result
|
# Test0009: Create snap_a and check in result
|
||||||
# - name: 0009 - create snapshot a
|
- name: 0009 - create snapshot a
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# folder: "{{ vm1 | dirname }}"
|
folder: "{{ vm1 | dirname }}"
|
||||||
# name: "{{ vm1 | basename }}"
|
name: "{{ vm1 | basename }}"
|
||||||
# state: present
|
state: present
|
||||||
# snapshot_name: snap_a
|
snapshot_name: snap_a
|
||||||
# description: "snap named a"
|
description: "snap named a"
|
||||||
# register: snapshot_details
|
register: snapshot_details
|
||||||
#
|
|
||||||
# - name: Check if snapshot details available or not
|
- name: Check if snapshot details available or not
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - "snapshot_details.results['current_snapshot']['name'] == 'snap_a'"
|
- "snapshot_details.results['current_snapshot']['name'] == 'snap_a'"
|
||||||
#
|
|
||||||
# # Test0010: Failure sceanrios
|
# Test0010: Failure sceanrios
|
||||||
# - name: 0010 - Folder is missing
|
- name: 0010 - Folder is missing
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# name: "{{ vm1 | basename }}"
|
name: "{{ vm1 | basename }}"
|
||||||
# state: present
|
state: present
|
||||||
# snapshot_name: snap_a
|
snapshot_name: snap_a
|
||||||
# description: "snap named a"
|
description: "snap named a"
|
||||||
# register: snapshot_failure_details
|
register: snapshot_failure_details
|
||||||
# ignore_errors: yes
|
ignore_errors: yes
|
||||||
#
|
|
||||||
# - name: Check if error is shown
|
- name: Check if error is shown
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - "'parameters are required together: name, folder' in snapshot_failure_details['msg']"
|
- "'parameters are required together: name, folder' in snapshot_failure_details['msg']"
|
||||||
# - "snapshot_failure_details.changed == false"
|
- "snapshot_failure_details.changed == false"
|
||||||
#
|
|
||||||
# # Test0011: Failure sceanrios - when name and UUID is not specified
|
# Test0011: Failure sceanrios - when name and UUID is not specified
|
||||||
# - name: 0011 - name and UUID is missing
|
- name: 0011 - name and UUID is missing
|
||||||
# vmware_guest_snapshot:
|
vmware_guest_snapshot:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
datacenter: "{{ dc1 | basename }}"
|
||||||
# state: present
|
state: present
|
||||||
# snapshot_name: snap_a
|
snapshot_name: snap_a
|
||||||
# description: "snap named a"
|
description: "snap named a"
|
||||||
# register: snapshot_failure_details
|
register: snapshot_failure_details
|
||||||
# ignore_errors: yes
|
ignore_errors: yes
|
||||||
#
|
|
||||||
# - name: Check if error is shown
|
- name: Check if error is shown
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - "'one of the following is required: name, uuid' in snapshot_failure_details['msg']"
|
- "'one of the following is required: name, uuid' in snapshot_failure_details['msg']"
|
||||||
# - "snapshot_failure_details.changed == false"
|
- "snapshot_failure_details.changed == false"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
destructive
|
destructive
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,64 +4,64 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support snapshot related functionalities
|
# TODO: vcsim does not support snapshot related functionalities
|
||||||
|
|
||||||
# - name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
# - debug: var=vcsim
|
- debug: var=vcsim
|
||||||
#
|
|
||||||
# - 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
|
|
||||||
#
|
|
||||||
# - name: get a list of VMS from vcsim
|
|
||||||
# uri:
|
|
||||||
# url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}"
|
|
||||||
# register: vmlist
|
|
||||||
#
|
|
||||||
# - set_fact:
|
|
||||||
# vm1: "{{ vmlist['json'][0] }}"
|
|
||||||
#
|
|
||||||
# - name: get a list of datacenters from vcsim
|
|
||||||
# uri:
|
|
||||||
# url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=DC' }}"
|
|
||||||
# register: datacenters
|
|
||||||
#
|
|
||||||
# - set_fact:
|
|
||||||
# dc1: "{{ datacenters['json'][0] }}"
|
|
||||||
#
|
|
||||||
# - debug: var=vcsim_instance
|
|
||||||
# - debug: var=vmlist
|
|
||||||
# - debug: var=vm1
|
|
||||||
# - debug: var=dc1
|
|
||||||
#
|
|
||||||
# - name: Gather snapshot facts about given virtual machine
|
|
||||||
# vmware_guest_snapshot_facts:
|
|
||||||
# validate_certs: False
|
|
||||||
# hostname: "{{ vcsim }}"
|
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
|
||||||
# datacenter: "{{ dc1 | basename }}"
|
|
||||||
# folder: "{{ vm1 | dirname }}"
|
|
||||||
# register: vm_snapshot_facts
|
|
||||||
|
|
||||||
# - debug: vm_snapshot_facts
|
- name: Wait for Flask controller to come up online
|
||||||
|
wait_for:
|
||||||
|
host: "{{ vcsim }}"
|
||||||
|
port: 5000
|
||||||
|
state: started
|
||||||
|
|
||||||
# - assert:
|
- name: kill vcsim
|
||||||
# that:
|
uri:
|
||||||
# - "not vm_snapshot_facts.changed"
|
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
|
||||||
|
|
||||||
|
- name: get a list of VMS from vcsim
|
||||||
|
uri:
|
||||||
|
url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=VM' }}"
|
||||||
|
register: vmlist
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
vm1: "{{ vmlist['json'][0] }}"
|
||||||
|
|
||||||
|
- name: get a list of datacenters from vcsim
|
||||||
|
uri:
|
||||||
|
url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=DC' }}"
|
||||||
|
register: datacenters
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
dc1: "{{ datacenters['json'][0] }}"
|
||||||
|
|
||||||
|
- debug: var=vcsim_instance
|
||||||
|
- debug: var=vmlist
|
||||||
|
- debug: var=vm1
|
||||||
|
- debug: var=dc1
|
||||||
|
|
||||||
|
- name: Gather snapshot facts about given virtual machine
|
||||||
|
vmware_guest_snapshot_facts:
|
||||||
|
validate_certs: False
|
||||||
|
hostname: "{{ vcsim }}"
|
||||||
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
|
datacenter: "{{ dc1 | basename }}"
|
||||||
|
folder: "{{ vm1 | dirname }}"
|
||||||
|
register: vm_snapshot_facts
|
||||||
|
|
||||||
|
- debug: vm_snapshot_facts
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- "not vm_snapshot_facts.changed"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,60 +4,60 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support Acceptance Level related to operations
|
# TODO: vcsim does not support Acceptance Level related to operations
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: get a list of hosts from vcsim
|
- name: get a list of hosts from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
url: http://{{ vcsim }}:5000/govc_find?filter=H
|
||||||
# register: hosts
|
register: hosts
|
||||||
|
|
||||||
#- name: get a host
|
- name: get a host
|
||||||
# set_fact:
|
set_fact:
|
||||||
# host1: "{{ hosts.json[0] | basename }}"
|
host1: "{{ hosts.json[0] | basename }}"
|
||||||
|
|
||||||
#- debug: var=host1
|
- debug: var=host1
|
||||||
|
|
||||||
#- name: Change acceptance level of given hosts
|
- name: Change acceptance level of given hosts
|
||||||
# vmware_host_acceptance:
|
vmware_host_acceptance:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ user }}"
|
username: "{{ user }}"
|
||||||
# password: "{{ passwd }}"
|
password: "{{ passwd }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# acceptance_level: vmware_certified
|
acceptance_level: vmware_certified
|
||||||
# state: present
|
state: present
|
||||||
# register: host_acceptance_facts
|
register: host_acceptance_facts
|
||||||
|
|
||||||
#- debug: var=host_acceptance_facts
|
- debug: var=host_acceptance_facts
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - host_acceptance_facts.facts is defined
|
- host_acceptance_facts.facts is defined
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,81 +4,81 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support host system capabilities
|
# TODO: vcsim does not support host system capabilities
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: get a list of Cluster from vcsim
|
- name: get a list of Cluster from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=CCR
|
url: http://{{ vcsim }}:5000/govc_find?filter=CCR
|
||||||
# register: clusters
|
register: clusters
|
||||||
|
|
||||||
#- name: get a cluster
|
- name: get a cluster
|
||||||
# set_fact:
|
set_fact:
|
||||||
# ccr1: "{{ clusters.json[0] | basename }}"
|
ccr1: "{{ clusters.json[0] | basename }}"
|
||||||
|
|
||||||
#- name: get a list of hosts from vcsim
|
- name: get a list of hosts from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
url: http://{{ vcsim }}:5000/govc_find?filter=H
|
||||||
# register: hosts
|
register: hosts
|
||||||
|
|
||||||
#- name: get a host
|
- name: get a host
|
||||||
# set_fact:
|
set_fact:
|
||||||
# host1: "{{ hosts.json[0] | basename }}"
|
host1: "{{ hosts.json[0] | basename }}"
|
||||||
|
|
||||||
#- debug: var=ccr1
|
- debug: var=ccr1
|
||||||
#- debug: var=host1
|
- debug: var=host1
|
||||||
|
|
||||||
#- name: Gather capability facts for all ESXi host from given cluster
|
- name: Gather capability facts for all ESXi host from given cluster
|
||||||
# vmware_host_capability_facts:
|
vmware_host_capability_facts:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# cluster_name: "{{ ccr1 }}"
|
cluster_name: "{{ ccr1 }}"
|
||||||
# register: capability_0001_results
|
register: capability_0001_results
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - "not capability_0001_results.changed"
|
- "not capability_0001_results.changed"
|
||||||
# - "capability_0001_results.hosts_capability_facts is defined"
|
- "capability_0001_results.hosts_capability_facts is defined"
|
||||||
|
|
||||||
#- name: Gather capability facts for ESXi host
|
- name: Gather capability facts for ESXi host
|
||||||
# vmware_host_capability_facts:
|
vmware_host_capability_facts:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# register: capability_0002_results
|
register: capability_0002_results
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - "not capability_0002_results.changed"
|
- "not capability_0002_results.changed"
|
||||||
# - "capability_0002_results.hosts_capability_facts is defined"
|
- "capability_0002_results.hosts_capability_facts is defined"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,85 +4,85 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support update host configuartion
|
# TODO: vcsim does not support update host configuartion
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: get a list of Cluster from vcsim
|
- name: get a list of Cluster from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=CCR
|
url: http://{{ vcsim }}:5000/govc_find?filter=CCR
|
||||||
# register: clusters
|
register: clusters
|
||||||
|
|
||||||
#- name: get a cluster
|
- name: get a cluster
|
||||||
# set_fact:
|
set_fact:
|
||||||
# ccr1: "{{ clusters.json[0] | basename }}"
|
ccr1: "{{ clusters.json[0] | basename }}"
|
||||||
|
|
||||||
#- name: get a list of hosts from vcsim
|
- name: get a list of hosts from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
url: http://{{ vcsim }}:5000/govc_find?filter=H
|
||||||
# register: hosts
|
register: hosts
|
||||||
|
|
||||||
#- name: get a host
|
- name: get a host
|
||||||
# set_fact:
|
set_fact:
|
||||||
# host1: "{{ hosts.json[0] | basename }}"
|
host1: "{{ hosts.json[0] | basename }}"
|
||||||
|
|
||||||
#- debug: var=ccr1
|
- debug: var=ccr1
|
||||||
#- debug: var=host1
|
- debug: var=host1
|
||||||
|
|
||||||
#- name: Change facts about all hosts in given cluster
|
- name: Change facts about all hosts in given cluster
|
||||||
# vmware_host_config_manager:
|
vmware_host_config_manager:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# cluster_name: "{{ ccr1 }}"
|
cluster_name: "{{ ccr1 }}"
|
||||||
# options:
|
options:
|
||||||
# 'Config.HostAgent.log.level': 'verbose'
|
'Config.HostAgent.log.level': 'verbose'
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: all_hosts_result
|
register: all_hosts_result
|
||||||
|
|
||||||
#- name: ensure changes are done to all hosts
|
- name: ensure changes are done to all hosts
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - all_hosts_result.changed
|
- all_hosts_result.changed
|
||||||
|
|
||||||
#- name: Change facts about a given host
|
- name: Change facts about a given host
|
||||||
# vmware_host_config_manager:
|
vmware_host_config_manager:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# options:
|
options:
|
||||||
# 'Config.HostAgent.log.level': 'info'
|
'Config.HostAgent.log.level': 'info'
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: host_result
|
register: host_result
|
||||||
|
|
||||||
#- name: ensure changes are done to given hosts
|
- name: ensure changes are done to given hosts
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - all_hosts_result.changed
|
- all_hosts_result.changed
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,144 +4,144 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support update host NTP configuration
|
# TODO: vcsim does not support update host NTP configuration
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: get a list of Cluster from vcsim
|
- name: get a list of Cluster from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=CCR
|
url: http://{{ vcsim }}:5000/govc_find?filter=CCR
|
||||||
# register: clusters
|
register: clusters
|
||||||
|
|
||||||
#- name: get a cluster
|
- name: get a cluster
|
||||||
# set_fact:
|
set_fact:
|
||||||
# ccr1: "{{ clusters.json[0] | basename }}"
|
ccr1: "{{ clusters.json[0] | basename }}"
|
||||||
|
|
||||||
#- name: get a list of hosts from vcsim
|
- name: get a list of hosts from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
url: http://{{ vcsim }}:5000/govc_find?filter=H
|
||||||
# register: hosts
|
register: hosts
|
||||||
|
|
||||||
#- name: get a host
|
- name: get a host
|
||||||
# set_fact:
|
set_fact:
|
||||||
# host1: "{{ hosts.json[0] | basename }}"
|
host1: "{{ hosts.json[0] | basename }}"
|
||||||
|
|
||||||
#- debug: var=ccr1
|
- debug: var=ccr1
|
||||||
#- debug: var=host1
|
- debug: var=host1
|
||||||
|
|
||||||
#- name: Change facts about all hosts in given cluster
|
- name: Change facts about all hosts in given cluster
|
||||||
# vmware_host_ntp:
|
vmware_host_ntp:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# state: present
|
state: present
|
||||||
# ntp_server:
|
ntp_server:
|
||||||
# - 0.pool.ntp.org
|
- 0.pool.ntp.org
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: present
|
register: present
|
||||||
|
|
||||||
#- debug: var=present
|
- debug: var=present
|
||||||
|
|
||||||
#- name: Change facts about all hosts in given cluster
|
- name: Change facts about all hosts in given cluster
|
||||||
# vmware_host_ntp:
|
vmware_host_ntp:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# state: present
|
state: present
|
||||||
# ntp_server:
|
ntp_server:
|
||||||
# - 1.pool.ntp.org
|
- 1.pool.ntp.org
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: present
|
register: present
|
||||||
|
|
||||||
#- debug: var=present
|
- debug: var=present
|
||||||
|
|
||||||
#- name: Change facts about all hosts in given cluster
|
- name: Change facts about all hosts in given cluster
|
||||||
# vmware_host_ntp:
|
vmware_host_ntp:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# state: absent
|
state: absent
|
||||||
# ntp_server:
|
ntp_server:
|
||||||
# - 1.pool.ntp.org
|
- 1.pool.ntp.org
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: present
|
register: present
|
||||||
|
|
||||||
#- debug: var=present
|
- debug: var=present
|
||||||
|
|
||||||
#- name: Change facts about all hosts in given cluster
|
- name: Change facts about all hosts in given cluster
|
||||||
# vmware_host_ntp:
|
vmware_host_ntp:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# state: present
|
state: present
|
||||||
# ntp_server:
|
ntp_server:
|
||||||
# - 1.pool.ntp.org
|
- 1.pool.ntp.org
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: present
|
register: present
|
||||||
|
|
||||||
#- debug: var=present
|
- debug: var=present
|
||||||
|
|
||||||
#- name: Change facts about all hosts in given cluster
|
- name: Change facts about all hosts in given cluster
|
||||||
# vmware_host_ntp:
|
vmware_host_ntp:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# state: present
|
state: present
|
||||||
# ntp_server:
|
ntp_server:
|
||||||
# - 2.pool.ntp.org
|
- 2.pool.ntp.org
|
||||||
# - 3.pool.ntp.org
|
- 3.pool.ntp.org
|
||||||
# - 4.pool.ntp.org
|
- 4.pool.ntp.org
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: present
|
register: present
|
||||||
|
|
||||||
#- debug: var=present
|
- debug: var=present
|
||||||
|
|
||||||
#- name: Change facts about all hosts in given cluster
|
- name: Change facts about all hosts in given cluster
|
||||||
# vmware_host_ntp:
|
vmware_host_ntp:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# state: absent
|
state: absent
|
||||||
# ntp_server:
|
ntp_server:
|
||||||
# - 0.pool.ntp.org
|
- 0.pool.ntp.org
|
||||||
# - 1.pool.ntp.org
|
- 1.pool.ntp.org
|
||||||
# - 2.pool.ntp.org
|
- 2.pool.ntp.org
|
||||||
# - 3.pool.ntp.org
|
- 3.pool.ntp.org
|
||||||
# - 4.pool.ntp.org
|
- 4.pool.ntp.org
|
||||||
# - 6.pool.ntp.org
|
- 6.pool.ntp.org
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: present
|
register: present
|
||||||
|
|
||||||
#- debug: var=present
|
- debug: var=present
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,58 +4,58 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support Package Manager related to operations
|
# TODO: vcsim does not support Package Manager related to operations
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: get a list of hosts from vcsim
|
- name: get a list of hosts from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
url: http://{{ vcsim }}:5000/govc_find?filter=H
|
||||||
# register: hosts
|
register: hosts
|
||||||
|
|
||||||
#- name: get a host
|
- name: get a host
|
||||||
# set_fact:
|
set_fact:
|
||||||
# host1: "{{ hosts.json[0] | basename }}"
|
host1: "{{ hosts.json[0] | basename }}"
|
||||||
|
|
||||||
#- debug: var=host1
|
- debug: var=host1
|
||||||
|
|
||||||
#- name: Gather facts about all hosts in given cluster
|
- name: Gather facts about all hosts in given cluster
|
||||||
# vmware_host_package_facts:
|
vmware_host_package_facts:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ user }}"
|
username: "{{ user }}"
|
||||||
# password: "{{ passwd }}"
|
password: "{{ passwd }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: host_packages
|
register: host_packages
|
||||||
|
|
||||||
#- debug: var=host_packages
|
- debug: var=host_packages
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - host_packages.hosts_package_facts is defined
|
- host_packages.hosts_package_facts is defined
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,58 +4,58 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support service related to operations
|
# TODO: vcsim does not support service related to operations
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: get a list of hosts from vcsim
|
- name: get a list of hosts from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
url: http://{{ vcsim }}:5000/govc_find?filter=H
|
||||||
# register: hosts
|
register: hosts
|
||||||
|
|
||||||
#- name: get a host
|
- name: get a host
|
||||||
# set_fact:
|
set_fact:
|
||||||
# host1: "{{ hosts.json[0] | basename }}"
|
host1: "{{ hosts.json[0] | basename }}"
|
||||||
|
|
||||||
#- debug: var=host1
|
- debug: var=host1
|
||||||
|
|
||||||
#- name: Change facts about all hosts in given cluster
|
- name: Change facts about all hosts in given cluster
|
||||||
# vmware_host_service_facts:
|
vmware_host_service_facts:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ user }}"
|
username: "{{ user }}"
|
||||||
# password: "{{ passwd }}"
|
password: "{{ passwd }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: host_services
|
register: host_services
|
||||||
|
|
||||||
#- debug: var=host_services
|
- debug: var=host_services
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - host_services.host_service_facts is defined
|
- host_services.host_service_facts is defined
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
destructive
|
destructive
|
||||||
|
unsupported
|
||||||
|
|
|
@ -5,85 +5,85 @@
|
||||||
# TODO: vcsim does not support service management
|
# TODO: vcsim does not support service management
|
||||||
# commenting this testcase till the time.
|
# commenting this testcase till the time.
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: get a list of Cluster from vcsim
|
- name: get a list of Cluster from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=CCR
|
url: http://{{ vcsim }}:5000/govc_find?filter=CCR
|
||||||
# register: clusters
|
register: clusters
|
||||||
|
|
||||||
#- name: get a cluster
|
- name: get a cluster
|
||||||
# set_fact:
|
set_fact:
|
||||||
# ccr1: "{{ clusters.json[0] | basename }}"
|
ccr1: "{{ clusters.json[0] | basename }}"
|
||||||
|
|
||||||
#- name: get a list of hosts from vcsim
|
- name: get a list of hosts from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
url: http://{{ vcsim }}:5000/govc_find?filter=H
|
||||||
# register: hosts
|
register: hosts
|
||||||
|
|
||||||
#- name: get a cluster
|
- name: get a cluster
|
||||||
# set_fact:
|
set_fact:
|
||||||
# host1: "{{ hosts.json[0] | basename }}"
|
host1: "{{ hosts.json[0] | basename }}"
|
||||||
|
|
||||||
#- debug: var=ccr1
|
- debug: var=ccr1
|
||||||
#- debug: var=host1
|
- debug: var=host1
|
||||||
|
|
||||||
#- name: Start ntpd service on all hosts in given cluster
|
- name: Start ntpd service on all hosts in given cluster
|
||||||
# vmware_host_service_manager:
|
vmware_host_service_manager:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# cluster_name: "{{ ccr1 }}"
|
cluster_name: "{{ ccr1 }}"
|
||||||
# service_name: ntpd
|
service_name: ntpd
|
||||||
# state: present
|
state: present
|
||||||
# register: all_hosts_result
|
register: all_hosts_result
|
||||||
|
|
||||||
#- name: ensure facts are gathered for all hosts
|
- name: ensure facts are gathered for all hosts
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - all_hosts_result.changed
|
- all_hosts_result.changed
|
||||||
|
|
||||||
#- name: Stop ntpd service on a given host
|
- name: Stop ntpd service on a given host
|
||||||
# vmware_host_service_manager:
|
vmware_host_service_manager:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# service_name: ntpd
|
service_name: ntpd
|
||||||
# state: absent
|
state: absent
|
||||||
# register: single_hosts_result
|
register: single_hosts_result
|
||||||
|
|
||||||
#- name: ensure facts are gathered for all hosts
|
- name: ensure facts are gathered for all hosts
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - single_hosts_result.changed == False
|
- single_hosts_result.changed == False
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,58 +4,58 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support networkConfig related to operations
|
# TODO: vcsim does not support networkConfig related to operations
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: get a list of hosts from vcsim
|
- name: get a list of hosts from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
url: http://{{ vcsim }}:5000/govc_find?filter=H
|
||||||
# register: hosts
|
register: hosts
|
||||||
|
|
||||||
#- name: get a host
|
- name: get a host
|
||||||
# set_fact:
|
set_fact:
|
||||||
# host1: "{{ hosts.json[0] | basename }}"
|
host1: "{{ hosts.json[0] | basename }}"
|
||||||
|
|
||||||
#- debug: var=host1
|
- debug: var=host1
|
||||||
|
|
||||||
#- name: Gather facts about all hosts in given cluster
|
- name: Gather facts about all hosts in given cluster
|
||||||
# vmware_host_vmnics_facts:
|
vmware_host_vmnics_facts:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ user }}"
|
username: "{{ user }}"
|
||||||
# password: "{{ passwd }}"
|
password: "{{ passwd }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: host_vmnics
|
register: host_vmnics
|
||||||
|
|
||||||
#- debug: var=host_vmnics
|
- debug: var=host_vmnics
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - host_vmnics.host_service_facts is defined
|
- host_vmnics.host_service_facts is defined
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
posix/ci/cloud/group1/vcenter
|
posix/ci/cloud/group1/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
destructive
|
destructive
|
||||||
|
unsupported
|
||||||
|
|
|
@ -5,47 +5,47 @@
|
||||||
# Commenting local user testcases as older vcsim docker image
|
# Commenting local user testcases as older vcsim docker image
|
||||||
# does not support this.
|
# does not support this.
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
# Local user manager works only with standalone ESXi server
|
# Local user manager works only with standalone ESXi server
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?esx=1
|
url: http://{{ vcsim }}:5000/spawn?esx=1
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: Gather facts about users
|
- name: Gather facts about users
|
||||||
# vmware_local_user_facts:
|
vmware_local_user_facts:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# register: all_user_facts
|
register: all_user_facts
|
||||||
|
|
||||||
#- name: ensure user facts are gathered
|
- name: ensure user facts are gathered
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - not all_user_facts.changed
|
- not all_user_facts.changed
|
||||||
# - all_user_facts.local_user_facts is defined
|
- all_user_facts.local_user_facts is defined
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
posix/ci/cloud/group1/vcenter
|
posix/ci/cloud/group1/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
destructive
|
destructive
|
||||||
|
unsupported
|
||||||
|
|
|
@ -5,123 +5,123 @@
|
||||||
# Commenting local user testcases as older vcsim docker image
|
# Commenting local user testcases as older vcsim docker image
|
||||||
# does not support this.
|
# does not support this.
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
# Local user manager works only with standalone ESXi server
|
# Local user manager works only with standalone ESXi server
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?esx=1
|
url: http://{{ vcsim }}:5000/spawn?esx=1
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
# Testcase 0001: Add Local user in ESXi server
|
# Testcase 0001: Add Local user in ESXi server
|
||||||
#- name: add local user
|
- name: add local user
|
||||||
# vmware_local_user_manager:
|
vmware_local_user_manager:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# local_user_name: testuser_0001
|
local_user_name: testuser_0001
|
||||||
# local_user_password: "SamplePassword!"
|
local_user_password: "SamplePassword!"
|
||||||
# state: present
|
state: present
|
||||||
# register: user_add_0001
|
register: user_add_0001
|
||||||
|
|
||||||
#- name: ensure user is created
|
- name: ensure user is created
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - user_add_0001.changed == true
|
- user_add_0001.changed == true
|
||||||
|
|
||||||
# Testcase 0002: Delete Local user in ESXi server
|
# Testcase 0002: Delete Local user in ESXi server
|
||||||
#- name: Delete local user
|
- name: Delete local user
|
||||||
# vmware_local_user_manager:
|
vmware_local_user_manager:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# local_user_name: testuser_0001
|
local_user_name: testuser_0001
|
||||||
# state: absent
|
state: absent
|
||||||
# register: user_delete_0002
|
register: user_delete_0002
|
||||||
|
|
||||||
#- name: ensure user is deleted
|
- name: ensure user is deleted
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - user_delete_0002.changed == true
|
- user_delete_0002.changed == true
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
# Local user manager works only with standalone ESXi server not with vCenter
|
# Local user manager works only with standalone ESXi server not with vCenter
|
||||||
# So testcase should check failures
|
# So testcase should check failures
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
# Testcase 0003: Add Local user in vCenter server
|
# Testcase 0003: Add Local user in vCenter server
|
||||||
#- name: add local user
|
- name: add local user
|
||||||
# vmware_local_user_manager:
|
vmware_local_user_manager:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# local_user_name: testuser_0003
|
local_user_name: testuser_0003
|
||||||
# local_user_password: "SamplePassword!"
|
local_user_password: "SamplePassword!"
|
||||||
# state: present
|
state: present
|
||||||
# register: user_add_0003
|
register: user_add_0003
|
||||||
# ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
#- name: ensure user is created
|
- name: ensure user is created
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - user_add_0003.changed == false
|
- user_add_0003.changed == false
|
||||||
# - "{{ 'Failed to get local account manager settings' in user_add_0003.msg }}"
|
- "{{ 'Failed to get local account manager settings' in user_add_0003.msg }}"
|
||||||
|
|
||||||
## Testcase 0003: Delete Local user in vCenter server
|
# Testcase 0003: Delete Local user in vCenter server
|
||||||
#- name: Delete local user
|
- name: Delete local user
|
||||||
# vmware_local_user_manager:
|
vmware_local_user_manager:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# local_user_name: testuser_0003
|
local_user_name: testuser_0003
|
||||||
# state: absent
|
state: absent
|
||||||
# register: user_delete_0004
|
register: user_delete_0004
|
||||||
# ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
#- name: ensure user is deleted
|
- name: ensure user is deleted
|
||||||
# assert:
|
assert:
|
||||||
# that:
|
that:
|
||||||
# - user_delete_0004.changed == false
|
- user_delete_0004.changed == false
|
||||||
# - "{{ 'Failed to get local account manager settings' in user_delete_0004.msg }}"
|
- "{{ 'Failed to get local account manager settings' in user_delete_0004.msg }}"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,81 +4,81 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support SCSI target releated operations
|
# TODO: vcsim does not support SCSI target releated operations
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: get a list of Cluster from vcsim
|
- name: get a list of Cluster from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=CCR
|
url: http://{{ vcsim }}:5000/govc_find?filter=CCR
|
||||||
# register: clusters
|
register: clusters
|
||||||
|
|
||||||
#- name: get a cluster
|
- name: get a cluster
|
||||||
# set_fact:
|
set_fact:
|
||||||
# ccr1: "{{ clusters.json[0] | basename }}"
|
ccr1: "{{ clusters.json[0] | basename }}"
|
||||||
|
|
||||||
#- name: get a list of hosts from vcsim
|
- name: get a list of hosts from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
url: http://{{ vcsim }}:5000/govc_find?filter=H
|
||||||
# register: hosts
|
register: hosts
|
||||||
|
|
||||||
#- name: get a host
|
- name: get a host
|
||||||
# set_fact:
|
set_fact:
|
||||||
# host1: "{{ hosts.json[0] | basename }}"
|
host1: "{{ hosts.json[0] | basename }}"
|
||||||
|
|
||||||
#- debug: var=ccr1
|
- debug: var=ccr1
|
||||||
#- debug: var=host1
|
- debug: var=host1
|
||||||
|
|
||||||
#- name: Gather target facts for all ESXi host from given cluster
|
- name: Gather target facts for all ESXi host from given cluster
|
||||||
# vmware_target_canonical_facts:
|
vmware_target_canonical_facts:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# cluster_name: "{{ ccr1 }}"
|
cluster_name: "{{ ccr1 }}"
|
||||||
# register: target_0001_results
|
register: target_0001_results
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - "not target_0001_results.changed"
|
- "not target_0001_results.changed"
|
||||||
# - "target_0001_results.scsi_tgt_facts is defined"
|
- "target_0001_results.scsi_tgt_facts is defined"
|
||||||
|
|
||||||
#- name: Gather target facts for ESXi host
|
- name: Gather target facts for ESXi host
|
||||||
# vmware_target_canonical_facts:
|
vmware_target_canonical_facts:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance.json.username }}"
|
username: "{{ vcsim_instance.json.username }}"
|
||||||
# password: "{{ vcsim_instance.json.password }}"
|
password: "{{ vcsim_instance.json.password }}"
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# register: target_0002_results
|
register: target_0002_results
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - "not target_0002_results.changed"
|
- "not target_0002_results.changed"
|
||||||
# - "target_0002_results.scsi_tgt_facts is defined"
|
- "target_0002_results.scsi_tgt_facts is defined"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
destructive
|
destructive
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,74 +4,74 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support manage DRS rule
|
# TODO: vcsim does not support manage DRS rule
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: wait for flask server
|
- name: wait for flask server
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?datacenter=2&cluster=1&folder=0&ds=2&pool=2
|
url: http://{{ vcsim }}:5000/spawn?datacenter=2&cluster=1&folder=0&ds=2&pool=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- name: wait for vcsim server
|
- name: wait for vcsim server
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- debug: var=vcsim_instance
|
- debug: var=vcsim_instance
|
||||||
|
|
||||||
#- name: Create a DRS Affinity rule for vms
|
- name: Create a DRS Affinity rule for vms
|
||||||
# vmware_vm_vm_drs_rule:
|
vmware_vm_vm_drs_rule:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# drs_rule_name: drs_rule_0001
|
drs_rule_name: drs_rule_0001
|
||||||
# cluster_name: DC0_C0
|
cluster_name: DC0_C0
|
||||||
# vms:
|
vms:
|
||||||
# - DC0_C0_RP0_VM0
|
- DC0_C0_RP0_VM0
|
||||||
# - DC0_C0_RP0_VM1
|
- DC0_C0_RP0_VM1
|
||||||
# enabled: True
|
enabled: True
|
||||||
# affinity_rule: True
|
affinity_rule: True
|
||||||
# mandatory: True
|
mandatory: True
|
||||||
# register: drs_rule_0001_results
|
register: drs_rule_0001_results
|
||||||
|
|
||||||
#- debug: var=drs_rule_0001_results
|
- debug: var=drs_rule_0001_results
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - "{{ drs_rule_0001_results.changed }}"
|
- "{{ drs_rule_0001_results.changed }}"
|
||||||
|
|
||||||
#- name: Create a DRS Anti-Affinity rule for vms
|
- name: Create a DRS Anti-Affinity rule for vms
|
||||||
# vmware_vm_vm_drs_rule:
|
vmware_vm_vm_drs_rule:
|
||||||
# validate_certs: False
|
validate_certs: False
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
# drs_rule_name: drs_rule_0001
|
drs_rule_name: drs_rule_0001
|
||||||
# cluster_name: DC0_C0
|
cluster_name: DC0_C0
|
||||||
# vms:
|
vms:
|
||||||
# - DC0_C0_RP0_VM0
|
- DC0_C0_RP0_VM0
|
||||||
# - DC0_C0_RP0_VM1
|
- DC0_C0_RP0_VM1
|
||||||
# enabled: False
|
enabled: False
|
||||||
# affinity_rule: False
|
affinity_rule: False
|
||||||
# mandatory: False
|
mandatory: False
|
||||||
# register: drs_rule_0002_results
|
register: drs_rule_0002_results
|
||||||
|
|
||||||
#- debug: var=drs_rule_0002_results
|
- debug: var=drs_rule_0002_results
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - "{{ drs_rule_0002_results.changed }}"
|
- "{{ drs_rule_0002_results.changed }}"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,58 +4,58 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support HostVirtualNicManager related to operations
|
# TODO: vcsim does not support HostVirtualNicManager related to operations
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: get a list of hosts from vcsim
|
- name: get a list of hosts from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
url: http://{{ vcsim }}:5000/govc_find?filter=H
|
||||||
# register: hosts
|
register: hosts
|
||||||
|
|
||||||
#- name: get a host
|
- name: get a host
|
||||||
# set_fact:
|
set_fact:
|
||||||
# host1: "{{ hosts.json[0] | basename }}"
|
host1: "{{ hosts.json[0] | basename }}"
|
||||||
|
|
||||||
#- debug: var=host1
|
- debug: var=host1
|
||||||
|
|
||||||
#- name: Gather VNICs facts about all hosts in given cluster
|
- name: Gather VNICs facts about all hosts in given cluster
|
||||||
# vmware_vmkernel_facts:
|
vmware_vmkernel_facts:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ user }}"
|
username: "{{ user }}"
|
||||||
# password: "{{ passwd }}"
|
password: "{{ passwd }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: host_vmkernel
|
register: host_vmkernel
|
||||||
|
|
||||||
#- debug: var=host_vmkernel
|
- debug: var=host_vmkernel
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - host_vmkernel.host_vmk_facts is defined
|
- host_vmkernel.host_vmk_facts is defined
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
destructive
|
destructive
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,148 +4,148 @@
|
||||||
|
|
||||||
# TODO: akasurde: VCSIM does not suport network manager system
|
# TODO: akasurde: VCSIM does not suport network manager system
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: '{{ lookup("env", "vcenter_host") }}'
|
vcsim: '{{ lookup("env", "vcenter_host") }}'
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim
|
var: vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: '{{ vcsim }}'
|
host: '{{ vcsim }}'
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: Kill vcsim
|
- name: Kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: Start vcsim
|
- name: Start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: '{{ vcsim }}'
|
host: '{{ vcsim }}'
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
# FIXME: Implement check-mode support
|
# FIXME: Implement check-mode support
|
||||||
#- name: Add a nic to a switch (check-mode)
|
- name: Add a nic to a switch (check-mode)
|
||||||
# vmware_vswitch: &add_nic
|
vmware_vswitch: &add_nic
|
||||||
# hostname: '{{ vcsim }}'
|
hostname: '{{ vcsim }}'
|
||||||
# username: '{{ vcsim_instance.json.username }}'
|
username: '{{ vcsim_instance.json.username }}'
|
||||||
# password: '{{ vcsim_instance.json.password }}'
|
password: '{{ vcsim_instance.json.password }}'
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# switch: vmswitch_0001
|
switch: vmswitch_0001
|
||||||
# nics: vnic_1
|
nics: vnic_1
|
||||||
# state: present
|
state: present
|
||||||
# check_mode: yes
|
check_mode: yes
|
||||||
# register: add_nic_check
|
register: add_nic_check
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - add_nic_check.changed == true
|
- add_nic_check.changed == true
|
||||||
# - add_nic_check.skipped == true
|
- add_nic_check.skipped == true
|
||||||
|
|
||||||
#- name: Add a nic to a switch
|
- name: Add a nic to a switch
|
||||||
# vmware_vswitch: *add_nic
|
vmware_vswitch: *add_nic
|
||||||
# register: add_nic_run
|
register: add_nic_run
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - add_nic_run.changed == true
|
- add_nic_run.changed == true
|
||||||
|
|
||||||
## FIXME: Implement check-mode support
|
# FIXME: Implement check-mode support
|
||||||
#- name: Add a nic to a switch again (check-mode)
|
- name: Add a nic to a switch again (check-mode)
|
||||||
# vmware_vswitch: *add_nic
|
vmware_vswitch: *add_nic
|
||||||
# check_mode: yes
|
check_mode: yes
|
||||||
# register: add_nic_again_check
|
register: add_nic_again_check
|
||||||
#
|
|
||||||
#- assert:
|
|
||||||
# that:
|
|
||||||
# - add_nic_again_check.changed == false
|
|
||||||
#
|
|
||||||
#- name: Add a nic to a switch again
|
|
||||||
# vmware_vswitch: *add_nic
|
|
||||||
# register: add_nic_again_run
|
|
||||||
#
|
|
||||||
#- assert:
|
|
||||||
# that:
|
|
||||||
# - add_nic_again_run.changed == false
|
|
||||||
#
|
|
||||||
#- name: Remove a switch (check-mode)
|
|
||||||
# vmware_vswitch: &remove_nic
|
|
||||||
# hostname: '{{ vcsim }}'
|
|
||||||
# username: '{{ vcsim_instance.json.username }}'
|
|
||||||
# password: '{{ vcsim_instance.json.password }}'
|
|
||||||
# validate_certs: no
|
|
||||||
# switch: vmswitch_0001
|
|
||||||
# state: absent
|
|
||||||
# check_mode: yes
|
|
||||||
# register: remove_nic_check
|
|
||||||
#
|
|
||||||
## FIXME: Implement check-mode support
|
|
||||||
#- assert:
|
|
||||||
# that:
|
|
||||||
# - remove_nic_check.changed == true
|
|
||||||
|
|
||||||
## FIXME: Removing a switch fails
|
- assert:
|
||||||
#- name: Remove a switch
|
that:
|
||||||
# vmware_vswitch: *remove_nic
|
- add_nic_again_check.changed == false
|
||||||
# register: remove_nic_run
|
|
||||||
#
|
|
||||||
#- assert:
|
|
||||||
# that:
|
|
||||||
# - remove_nic_run.changed == true
|
|
||||||
#
|
|
||||||
#- name: Remove a switch again (check-mode)
|
|
||||||
# vmware_vswitch: *remove_nic
|
|
||||||
# check_mode: yes
|
|
||||||
# register: remove_nic_again_check
|
|
||||||
#
|
|
||||||
## FIXME: Implement check-mode support
|
|
||||||
#- assert:
|
|
||||||
# that:
|
|
||||||
# - remove_nic_again_check_mode.changed == false
|
|
||||||
#
|
|
||||||
## FIXME: Removing a switch fails
|
|
||||||
#- name: Remove a switch again
|
|
||||||
# vmware_vswitch: *remove_nic
|
|
||||||
# register: remove_nic_again_run
|
|
||||||
#
|
|
||||||
#- assert:
|
|
||||||
# that:
|
|
||||||
# - remove_nic_again_run.changed == false
|
|
||||||
|
|
||||||
#- name: get a list of Host Systems from vcsim
|
- name: Add a nic to a switch again
|
||||||
# uri:
|
vmware_vswitch: *add_nic
|
||||||
# url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=H' }}"
|
register: add_nic_again_run
|
||||||
# register: host_systems
|
|
||||||
|
|
||||||
#- name: get a host system
|
- assert:
|
||||||
# set_fact: hs1="{{ host_systems['json'][0] | basename }}"
|
that:
|
||||||
|
- add_nic_again_run.changed == false
|
||||||
|
|
||||||
#- debug: var=hs1
|
- name: Remove a switch (check-mode)
|
||||||
|
vmware_vswitch: &remove_nic
|
||||||
|
hostname: '{{ vcsim }}'
|
||||||
|
username: '{{ vcsim_instance.json.username }}'
|
||||||
|
password: '{{ vcsim_instance.json.password }}'
|
||||||
|
validate_certs: no
|
||||||
|
switch: vmswitch_0001
|
||||||
|
state: absent
|
||||||
|
check_mode: yes
|
||||||
|
register: remove_nic_check
|
||||||
|
|
||||||
#- name: Add vswitch to a specific host system
|
# FIXME: Implement check-mode support
|
||||||
# vmware_vswitch:
|
- assert:
|
||||||
# validate_certs: False
|
that:
|
||||||
# hostname: "{{ vcsim }}"
|
- remove_nic_check.changed == true
|
||||||
# username: "{{ vcsim_instance['json']['username'] }}"
|
|
||||||
# password: "{{ vcsim_instance['json']['password'] }}"
|
|
||||||
# switch: vmswitch_0002
|
|
||||||
# nics: vnic_1
|
|
||||||
# esxi_hostname: hs1
|
|
||||||
# register: add_vswitch_with_host_system
|
|
||||||
|
|
||||||
#- debug: var=add_vswitch_with_host_system
|
# FIXME: Removing a switch fails
|
||||||
|
- name: Remove a switch
|
||||||
|
vmware_vswitch: *remove_nic
|
||||||
|
register: remove_nic_run
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - add_vswitch_with_host_system.changed == true
|
- remove_nic_run.changed == true
|
||||||
|
|
||||||
|
- name: Remove a switch again (check-mode)
|
||||||
|
vmware_vswitch: *remove_nic
|
||||||
|
check_mode: yes
|
||||||
|
register: remove_nic_again_check
|
||||||
|
|
||||||
|
# FIXME: Implement check-mode support
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- remove_nic_again_check_mode.changed == false
|
||||||
|
|
||||||
|
# FIXME: Removing a switch fails
|
||||||
|
- name: Remove a switch again
|
||||||
|
vmware_vswitch: *remove_nic
|
||||||
|
register: remove_nic_again_run
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- remove_nic_again_run.changed == false
|
||||||
|
|
||||||
|
- name: get a list of Host Systems from vcsim
|
||||||
|
uri:
|
||||||
|
url: "{{ 'http://' + vcsim + ':5000/govc_find?filter=H' }}"
|
||||||
|
register: host_systems
|
||||||
|
|
||||||
|
- name: get a host system
|
||||||
|
set_fact: hs1="{{ host_systems['json'][0] | basename }}"
|
||||||
|
|
||||||
|
- debug: var=hs1
|
||||||
|
|
||||||
|
- name: Add vswitch to a specific host system
|
||||||
|
vmware_vswitch:
|
||||||
|
validate_certs: False
|
||||||
|
hostname: "{{ vcsim }}"
|
||||||
|
username: "{{ vcsim_instance['json']['username'] }}"
|
||||||
|
password: "{{ vcsim_instance['json']['password'] }}"
|
||||||
|
switch: vmswitch_0002
|
||||||
|
nics: vnic_1
|
||||||
|
esxi_hostname: hs1
|
||||||
|
register: add_vswitch_with_host_system
|
||||||
|
|
||||||
|
- debug: var=add_vswitch_with_host_system
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- add_vswitch_with_host_system.changed == true
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
posix/ci/cloud/group4/vcenter
|
posix/ci/cloud/group4/vcenter
|
||||||
cloud/vcenter
|
cloud/vcenter
|
||||||
|
unsupported
|
||||||
|
|
|
@ -4,58 +4,58 @@
|
||||||
|
|
||||||
# TODO: vcsim does not support networkConfig related to operations
|
# TODO: vcsim does not support networkConfig related to operations
|
||||||
|
|
||||||
#- name: store the vcenter container ip
|
- name: store the vcenter container ip
|
||||||
# set_fact:
|
set_fact:
|
||||||
# vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
vcsim: "{{ lookup('env', 'vcenter_host') }}"
|
||||||
|
|
||||||
#- debug: var=vcsim
|
- debug: var=vcsim
|
||||||
|
|
||||||
#- name: Wait for Flask controller to come up online
|
- name: Wait for Flask controller to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 5000
|
port: 5000
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: kill vcsim
|
- name: kill vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/killall
|
url: http://{{ vcsim }}:5000/killall
|
||||||
|
|
||||||
#- name: start vcsim
|
- name: start vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/spawn?cluster=2
|
url: http://{{ vcsim }}:5000/spawn?cluster=2
|
||||||
# register: vcsim_instance
|
register: vcsim_instance
|
||||||
|
|
||||||
#- debug:
|
- debug:
|
||||||
# var: vcsim_instance
|
var: vcsim_instance
|
||||||
|
|
||||||
#- name: Wait for vcsim server to come up online
|
- name: Wait for vcsim server to come up online
|
||||||
# wait_for:
|
wait_for:
|
||||||
# host: "{{ vcsim }}"
|
host: "{{ vcsim }}"
|
||||||
# port: 443
|
port: 443
|
||||||
# state: started
|
state: started
|
||||||
|
|
||||||
#- name: get a list of hosts from vcsim
|
- name: get a list of hosts from vcsim
|
||||||
# uri:
|
uri:
|
||||||
# url: http://{{ vcsim }}:5000/govc_find?filter=H
|
url: http://{{ vcsim }}:5000/govc_find?filter=H
|
||||||
# register: hosts
|
register: hosts
|
||||||
|
|
||||||
#- name: get a host
|
- name: get a host
|
||||||
# set_fact:
|
set_fact:
|
||||||
# host1: "{{ hosts.json[0] | basename }}"
|
host1: "{{ hosts.json[0] | basename }}"
|
||||||
|
|
||||||
#- debug: var=host1
|
- debug: var=host1
|
||||||
|
|
||||||
#- name: Gather vswitch facts about all hosts in given cluster
|
- name: Gather vswitch facts about all hosts in given cluster
|
||||||
# vmware_vswitch_facts:
|
vmware_vswitch_facts:
|
||||||
# hostname: "{{ vcsim }}"
|
hostname: "{{ vcsim }}"
|
||||||
# username: "{{ user }}"
|
username: "{{ user }}"
|
||||||
# password: "{{ passwd }}"
|
password: "{{ passwd }}"
|
||||||
# esxi_hostname: "{{ host1 }}"
|
esxi_hostname: "{{ host1 }}"
|
||||||
# validate_certs: no
|
validate_certs: no
|
||||||
# register: switch_facts
|
register: switch_facts
|
||||||
|
|
||||||
#- debug: var=switch_facts
|
- debug: var=switch_facts
|
||||||
|
|
||||||
#- assert:
|
- assert:
|
||||||
# that:
|
that:
|
||||||
# - switch_facts.hosts_vswitch_facts is defined
|
- switch_facts.hosts_vswitch_facts is defined
|
||||||
|
|
Loading…
Reference in a new issue