diff --git a/test/integration/targets/inventory_vmware_vm_inventory/runme.sh b/test/integration/targets/inventory_vmware_vm_inventory/runme.sh index 3dccb1b3263..7ba306f7008 100755 --- a/test/integration/targets/inventory_vmware_vm_inventory/runme.sh +++ b/test/integration/targets/inventory_vmware_vm_inventory/runme.sh @@ -8,8 +8,7 @@ set -euo pipefail PYTHON=${ANSIBLE_TEST_PYTHON_INTERPRETER:-python} export ANSIBLE_CONFIG=ansible.cfg -export vcenter_host="${vcenter_host:-0.0.0.0}" -export VMWARE_SERVER="${vcenter_host}" +export VMWARE_SERVER="${VCENTER_HOST}" export VMWARE_USERNAME="${VMWARE_USERNAME:-user}" export VMWARE_PASSWORD="${VMWARE_PASSWORD:-pass}" VMWARE_CONFIG=test-config.vmware.yaml @@ -36,16 +35,16 @@ cleanup() { trap cleanup INT TERM EXIT -echo "DEBUG: Using ${vcenter_host} with username ${VMWARE_USERNAME} and password ${VMWARE_PASSWORD}" +echo "DEBUG: Using ${VCENTER_HOST} with username ${VMWARE_USERNAME} and password ${VMWARE_PASSWORD}" echo "Kill all previous instances" -curl "http://${vcenter_host}:5000/killall" > /dev/null 2>&1 +curl "http://${VCENTER_HOST}:5000/killall" > /dev/null 2>&1 echo "Start new VCSIM server" -curl "http://${vcenter_host}:5000/spawn?datacenter=1&cluster=1&folder=0" > /dev/null 2>&1 +curl "http://${VCENTER_HOST}:5000/spawn?datacenter=1&cluster=1&folder=0" > /dev/null 2>&1 echo "Debugging new instances" -curl "http://${vcenter_host}:5000/govc_find" +curl "http://${VCENTER_HOST}:5000/govc_find" # Get inventory ansible-inventory -i ${VMWARE_CONFIG} --list diff --git a/test/integration/targets/inventory_vmware_vm_inventory/test_vmware_vm_inventory.yml b/test/integration/targets/inventory_vmware_vm_inventory/test_vmware_vm_inventory.yml index 5cdc1350bab..f59200aaa7c 100644 --- a/test/integration/targets/inventory_vmware_vm_inventory/test_vmware_vm_inventory.yml +++ b/test/integration/targets/inventory_vmware_vm_inventory/test_vmware_vm_inventory.yml @@ -8,10 +8,7 @@ tasks: - name: store the vcenter container ip set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - - - debug: - var: vcsim + vcsim: "{{ lookup('env', 'VCENTER_HOST') }}" - name: Check that there are 'all' and 'otherGuest' groups present in inventory assert: diff --git a/test/integration/targets/vcenter_folder/tasks/main.yml b/test/integration/targets/vcenter_folder/tasks/main.yml index 74b21d6af82..317be6e6309 100644 --- a/test/integration/targets/vcenter_folder/tasks/main.yml +++ b/test/integration/targets/vcenter_folder/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vcenter_license/tasks/main.yml b/test/integration/targets/vcenter_license/tasks/main.yml index 8fd2dd9df0d..74f67b02b80 100644 --- a/test/integration/targets/vcenter_license/tasks/main.yml +++ b/test/integration/targets/vcenter_license/tasks/main.yml @@ -2,31 +2,24 @@ # Copyright: (c) 2017, Dag Wieers # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: Store the vCenter container IP - set_fact: - vcenter_host: "{{ lookup('env', 'vcenter_host') }}" - -- debug: - var: vcenter_host - -- name: Wait for vcsim controller to come online {{ vcenter_host }} +- name: Wait for vcsim controller to come online {{ vcsim }} wait_for: - host: "{{ vcenter_host }}" + host: "{{ vcsim }}" port: 5000 state: started - name: Kill vcsim uri: - url: http://{{ vcenter_host }}:5000/killall + url: http://{{ vcsim }}:5000/killall - name: Start vcsim uri: - url: http://{{ vcenter_host }}:5000/spawn?cluster=2 + url: http://{{ vcsim }}:5000/spawn?cluster=2 register: vcsim_instance -- name: Wait for vcsim server to come up online {{ vcenter_host }} +- name: Wait for vcsim server to come up online {{ vcsim }} wait_for: - host: "{{ vcenter_host }}" + host: "{{ vcsim }}" port: 443 state: started @@ -36,7 +29,7 @@ # FIXME: ServerFaultCode: LicenseManager:LicenseManager does not implement: AddLicense #- name: Add a vCenter evaluation license # vcenter_license: -# hostname: '{{ vcenter_host }}' +# hostname: '{{ vcsim }}' # username: '{{ vcsim_instance["json"]["username"] }}' # password: '{{ vcsim_instance["json"]["password"] }}' # validate_certs: no @@ -45,7 +38,7 @@ #- name: Remove an (unused) vCenter evaluation license # vcenter_license: -# hostname: '{{ vcenter_host }}' +# hostname: '{{ vcsim }}' # username: '{{ vcsim_instance["json"]["username"] }}' # password: '{{ vcsim_instance["json"]["password"] }}' # validate_certs: no @@ -54,7 +47,7 @@ #- name: Add an invalid vCenter license # vcenter_license: -# hostname: '{{ vcenter_host }}' +# hostname: '{{ vcsim }}' # username: '{{ vcsim_instance["json"]["username"] }}' # password: '{{ vcsim_instance["json"]["password"] }}' # validate_certs: no diff --git a/test/integration/targets/vmware_about_facts/tasks/main.yml b/test/integration/targets/vmware_about_facts/tasks/main.yml index d791b2ec728..72fa54cd5ee 100644 --- a/test/integration/targets/vmware_about_facts/tasks/main.yml +++ b/test/integration/targets/vmware_about_facts/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_cluster/tasks/main.yml b/test/integration/targets/vmware_cluster/tasks/main.yml index e0282aa6d7d..e772d65d2be 100644 --- a/test/integration/targets/vmware_cluster/tasks/main.yml +++ b/test/integration/targets/vmware_cluster/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2017, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_cluster_facts/tasks/main.yml b/test/integration/targets/vmware_cluster_facts/tasks/main.yml index 9e12deaafd6..d4480e326d4 100644 --- a/test/integration/targets/vmware_cluster_facts/tasks/main.yml +++ b/test/integration/targets/vmware_cluster_facts/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_datacenter/tasks/main.yml b/test/integration/targets/vmware_datacenter/tasks/main.yml index 5ddd21f4953..f7a8b0eaa19 100644 --- a/test/integration/targets/vmware_datacenter/tasks/main.yml +++ b/test/integration/targets/vmware_datacenter/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2017, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for vcsim controller to come online {{ vcsim }} wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_datastore_cluster/tasks/main.yml b/test/integration/targets/vmware_datastore_cluster/tasks/main.yml index f7b924ce0ae..435ca04daf6 100644 --- a/test/integration/targets/vmware_datastore_cluster/tasks/main.yml +++ b/test/integration/targets/vmware_datastore_cluster/tasks/main.yml @@ -2,13 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: '{{ lookup("env", "vcenter_host") }}' - -- debug: - var: vcsim - - name: Wait for Flask controller to come up online wait_for: host: '{{ vcsim }}' diff --git a/test/integration/targets/vmware_datastore_facts/tasks/main.yml b/test/integration/targets/vmware_datastore_facts/tasks/main.yml index dab779f9507..dd42b00b27b 100644 --- a/test/integration/targets/vmware_datastore_facts/tasks/main.yml +++ b/test/integration/targets/vmware_datastore_facts/tasks/main.yml @@ -3,13 +3,6 @@ # Copyright (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: - var: vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_datastore_maintenancemode/tasks/main.yml b/test/integration/targets/vmware_datastore_maintenancemode/tasks/main.yml index dd7418cab59..495bdd26518 100644 --- a/test/integration/targets/vmware_datastore_maintenancemode/tasks/main.yml +++ b/test/integration/targets/vmware_datastore_maintenancemode/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support datastore maintenance mode properties -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_drs_group/tasks/main.yml b/test/integration/targets/vmware_drs_group/tasks/main.yml index c94f5ebe0ae..02b5218664a 100644 --- a/test/integration/targets/vmware_drs_group/tasks/main.yml +++ b/test/integration/targets/vmware_drs_group/tasks/main.yml @@ -2,11 +2,6 @@ # Copyright: (c) 2018, Karsten Kaj Jakobsen # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: Store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_drs_group_facts/tasks/main.yml b/test/integration/targets/vmware_drs_group_facts/tasks/main.yml index 65bb3fc769a..e0777adbf8b 100644 --- a/test/integration/targets/vmware_drs_group_facts/tasks/main.yml +++ b/test/integration/targets/vmware_drs_group_facts/tasks/main.yml @@ -2,11 +2,6 @@ # Copyright: (c) 2018, Karsten Kaj Jakobsen # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_drs_rule_facts/tasks/main.yml b/test/integration/targets/vmware_drs_rule_facts/tasks/main.yml index e47cc949a98..bea32bc9b96 100644 --- a/test/integration/targets/vmware_drs_rule_facts/tasks/main.yml +++ b/test/integration/targets/vmware_drs_rule_facts/tasks/main.yml @@ -2,11 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_dvs_portgroup/tasks/main.yml b/test/integration/targets/vmware_dvs_portgroup/tasks/main.yml index 512ebaf95f3..fd5807f7448 100644 --- a/test/integration/targets/vmware_dvs_portgroup/tasks/main.yml +++ b/test/integration/targets/vmware_dvs_portgroup/tasks/main.yml @@ -17,12 +17,6 @@ # along with Ansible. If not, see . # -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_dvs_portgroup_facts/tasks/main.yml b/test/integration/targets/vmware_dvs_portgroup_facts/tasks/main.yml index c2db996bb49..bcd98def7f0 100644 --- a/test/integration/targets/vmware_dvs_portgroup_facts/tasks/main.yml +++ b/test/integration/targets/vmware_dvs_portgroup_facts/tasks/main.yml @@ -2,11 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_dvswitch/tasks/main.yml b/test/integration/targets/vmware_dvswitch/tasks/main.yml index dbdd0958923..aad1e8bf6a2 100644 --- a/test/integration/targets/vmware_dvswitch/tasks/main.yml +++ b/test/integration/targets/vmware_dvswitch/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2017, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_dvswitch_pvlans/tasks/main.yml b/test/integration/targets/vmware_dvswitch_pvlans/tasks/main.yml index 8d2b80a26b1..69563fc579e 100644 --- a/test/integration/targets/vmware_dvswitch_pvlans/tasks/main.yml +++ b/test/integration/targets/vmware_dvswitch_pvlans/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Christian Kotte # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_dvswitch_uplink_pg/tasks/main.yml b/test/integration/targets/vmware_dvswitch_uplink_pg/tasks/main.yml index b9e3ce3a20b..f245e25a864 100644 --- a/test/integration/targets/vmware_dvswitch_uplink_pg/tasks/main.yml +++ b/test/integration/targets/vmware_dvswitch_uplink_pg/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Christian Kotte # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_guest/tasks/main.yml b/test/integration/targets/vmware_guest/tasks/main.yml index 41a86151916..451233b156b 100644 --- a/test/integration/targets/vmware_guest/tasks/main.yml +++ b/test/integration/targets/vmware_guest/tasks/main.yml @@ -2,11 +2,6 @@ # Copyright: (c) 2017, James Tanner # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - include: poweroff_d1_c1_f0.yml - include: poweroff_d1_c1_f1.yml - include: check_mode.yml diff --git a/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml b/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml index 9049aaba46d..e748ff90b76 100644 --- a/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml +++ b/test/integration/targets/vmware_guest/tasks/poweroff_d1_c1_f1.yml @@ -8,11 +8,6 @@ port: 5000 state: started -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: kill vcsim uri: url: http://{{ vcsim }}:5000/killall diff --git a/test/integration/targets/vmware_guest_custom_attribute_defs/tasks/main.yml b/test/integration/targets/vmware_guest_custom_attribute_defs/tasks/main.yml index 06674f279b3..45a0e22870f 100644 --- a/test/integration/targets/vmware_guest_custom_attribute_defs/tasks/main.yml +++ b/test/integration/targets/vmware_guest_custom_attribute_defs/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_guest_custom_attributes/tasks/main.yml b/test/integration/targets/vmware_guest_custom_attributes/tasks/main.yml index 34a6b06592a..bf58105851b 100644 --- a/test/integration/targets/vmware_guest_custom_attributes/tasks/main.yml +++ b/test/integration/targets/vmware_guest_custom_attributes/tasks/main.yml @@ -5,12 +5,6 @@ # TODO: Current pinned version of vcsim does not support custom fields # commenting testcase below -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_guest_facts/tasks/main.yml b/test/integration/targets/vmware_guest_facts/tasks/main.yml index bdba6d4a59a..6745584585e 100644 --- a/test/integration/targets/vmware_guest_facts/tasks/main.yml +++ b/test/integration/targets/vmware_guest_facts/tasks/main.yml @@ -3,12 +3,6 @@ # Copyright: (c) 2018, James E. King III (@jeking3) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) --- -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_guest_find/tasks/main.yml b/test/integration/targets/vmware_guest_find/tasks/main.yml index 72ef13b4b00..b4aa0cff82e 100644 --- a/test/integration/targets/vmware_guest_find/tasks/main.yml +++ b/test/integration/targets/vmware_guest_find/tasks/main.yml @@ -2,11 +2,6 @@ # Copyright: (c) 2017, James Tanner # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: wait for flask server wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_guest_move/tasks/main.yml b/test/integration/targets/vmware_guest_move/tasks/main.yml index f03f3521341..9f636c24db9 100644 --- a/test/integration/targets/vmware_guest_move/tasks/main.yml +++ b/test/integration/targets/vmware_guest_move/tasks/main.yml @@ -2,11 +2,6 @@ # Copyright: (c) 2018, Jose Angel Munoz # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_guest_powerstate/tasks/main.yml b/test/integration/targets/vmware_guest_powerstate/tasks/main.yml index 105df5e303c..287d5db1afd 100644 --- a/test/integration/targets/vmware_guest_powerstate/tasks/main.yml +++ b/test/integration/targets/vmware_guest_powerstate/tasks/main.yml @@ -2,10 +2,5 @@ # Copyright: (c) 2017, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - include: poweroff_d1_c1_f0.yml - include: poweroff_d1_c1_f1.yml diff --git a/test/integration/targets/vmware_guest_powerstate/tasks/poweroff_d1_c1_f1.yml b/test/integration/targets/vmware_guest_powerstate/tasks/poweroff_d1_c1_f1.yml index f3e611cdc2f..2d35940a29e 100644 --- a/test/integration/targets/vmware_guest_powerstate/tasks/poweroff_d1_c1_f1.yml +++ b/test/integration/targets/vmware_guest_powerstate/tasks/poweroff_d1_c1_f1.yml @@ -8,11 +8,6 @@ port: 5000 state: started -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: kill vcsim uri: url: http://{{ vcsim }}:5000/killall diff --git a/test/integration/targets/vmware_guest_snapshot/tasks/main.yml b/test/integration/targets/vmware_guest_snapshot/tasks/main.yml index 10916a25e32..8a6c12c87f8 100644 --- a/test/integration/targets/vmware_guest_snapshot/tasks/main.yml +++ b/test/integration/targets/vmware_guest_snapshot/tasks/main.yml @@ -1,8 +1,3 @@ - - name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - - debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_guest_snapshot_facts/tasks/main.yml b/test/integration/targets/vmware_guest_snapshot_facts/tasks/main.yml index 361cbf40a2d..1e712c97daa 100644 --- a/test/integration/targets/vmware_guest_snapshot_facts/tasks/main.yml +++ b/test/integration/targets/vmware_guest_snapshot_facts/tasks/main.yml @@ -4,11 +4,6 @@ # TODO: vcsim does not support snapshot related functionalities - - name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - - debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_guest_tools_wait/tasks/main.yml b/test/integration/targets/vmware_guest_tools_wait/tasks/main.yml index ff1569bc51b..f5d983efb8e 100644 --- a/test/integration/targets/vmware_guest_tools_wait/tasks/main.yml +++ b/test/integration/targets/vmware_guest_tools_wait/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2017 Philippe Dellaert # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host/tasks/main.yml b/test/integration/targets/vmware_host/tasks/main.yml index 8aa76dfe311..a9d9a44cfef 100644 --- a/test/integration/targets/vmware_host/tasks/main.yml +++ b/test/integration/targets/vmware_host/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2017, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_acceptance/tasks/main.yml b/test/integration/targets/vmware_host_acceptance/tasks/main.yml index 816866564ab..11138f2a2f9 100644 --- a/test/integration/targets/vmware_host_acceptance/tasks/main.yml +++ b/test/integration/targets/vmware_host_acceptance/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support Acceptance Level related to operations -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_active_directory/tasks/main.yml b/test/integration/targets/vmware_host_active_directory/tasks/main.yml index 4aea37d67f3..60bb7a7372e 100644 --- a/test/integration/targets/vmware_host_active_directory/tasks/main.yml +++ b/test/integration/targets/vmware_host_active_directory/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Christian Kotte # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_capability_facts/tasks/main.yml b/test/integration/targets/vmware_host_capability_facts/tasks/main.yml index a149a1df0e2..298a676180d 100644 --- a/test/integration/targets/vmware_host_capability_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_capability_facts/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support host system capabilities -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_config_facts/tasks/main.yml b/test/integration/targets/vmware_host_config_facts/tasks/main.yml index c89a11944ad..c074c3b06a3 100644 --- a/test/integration/targets/vmware_host_config_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_config_facts/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_config_manager/tasks/main.yml b/test/integration/targets/vmware_host_config_manager/tasks/main.yml index e28aea6bc5a..40044792609 100644 --- a/test/integration/targets/vmware_host_config_manager/tasks/main.yml +++ b/test/integration/targets/vmware_host_config_manager/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support update host configuartion -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_dns_facts/tasks/main.yml b/test/integration/targets/vmware_host_dns_facts/tasks/main.yml index b6a645934b1..6a88fb9719c 100644 --- a/test/integration/targets/vmware_host_dns_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_dns_facts/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_facts/tasks/main.yml b/test/integration/targets/vmware_host_facts/tasks/main.yml index f6ffffcc319..ea85d3a0564 100644 --- a/test/integration/targets/vmware_host_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_facts/tasks/main.yml @@ -1,8 +1,3 @@ -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: kill vcsim uri: url: "{{ 'http://' + vcsim + ':5000/killall' }}" diff --git a/test/integration/targets/vmware_host_feature_facts/tasks/main.yml b/test/integration/targets/vmware_host_feature_facts/tasks/main.yml index 39450580b1a..f2c6c8511a6 100644 --- a/test/integration/targets/vmware_host_feature_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_feature_facts/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support host feature capabilities -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_firewall_facts/tasks/main.yml b/test/integration/targets/vmware_host_firewall_facts/tasks/main.yml index af3fc8a09ba..a3e2c9914eb 100644 --- a/test/integration/targets/vmware_host_firewall_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_firewall_facts/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_firewall_manager/tasks/main.yml b/test/integration/targets/vmware_host_firewall_manager/tasks/main.yml index f90e6b65838..17869915984 100644 --- a/test/integration/targets/vmware_host_firewall_manager/tasks/main.yml +++ b/test/integration/targets/vmware_host_firewall_manager/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_hyperthreading/tasks/main.yml b/test/integration/targets/vmware_host_hyperthreading/tasks/main.yml index 894042e38c8..b2062fa39a6 100644 --- a/test/integration/targets/vmware_host_hyperthreading/tasks/main.yml +++ b/test/integration/targets/vmware_host_hyperthreading/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Christian Kotte # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_ipv6/tasks/main.yml b/test/integration/targets/vmware_host_ipv6/tasks/main.yml index 1caa2d4f1a4..854afe7c200 100644 --- a/test/integration/targets/vmware_host_ipv6/tasks/main.yml +++ b/test/integration/targets/vmware_host_ipv6/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Christian Kotte # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_kernel_manager/tasks/main.yml b/test/integration/targets/vmware_host_kernel_manager/tasks/main.yml index 4b9d8e7a38a..3db58cdea6e 100644 --- a/test/integration/targets/vmware_host_kernel_manager/tasks/main.yml +++ b/test/integration/targets/vmware_host_kernel_manager/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2019, Aaron Longchamps # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_ntp/tasks/main.yml b/test/integration/targets/vmware_host_ntp/tasks/main.yml index 0c275d04774..f661971475e 100644 --- a/test/integration/targets/vmware_host_ntp/tasks/main.yml +++ b/test/integration/targets/vmware_host_ntp/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support update host NTP configuration -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_ntp_facts/tasks/main.yml b/test/integration/targets/vmware_host_ntp_facts/tasks/main.yml index 0b989bef000..1221612f4c0 100644 --- a/test/integration/targets/vmware_host_ntp_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_ntp_facts/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support NTP Manager related to operations -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_package_facts/tasks/main.yml b/test/integration/targets/vmware_host_package_facts/tasks/main.yml index b773e50b1d3..c4934962c59 100644 --- a/test/integration/targets/vmware_host_package_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_package_facts/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support Package Manager related to operations -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_powermgmt_policy/tasks/main.yml b/test/integration/targets/vmware_host_powermgmt_policy/tasks/main.yml index 8eb4b790067..b8e573e60bf 100644 --- a/test/integration/targets/vmware_host_powermgmt_policy/tasks/main.yml +++ b/test/integration/targets/vmware_host_powermgmt_policy/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Christian Kotte # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: Store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_powerstate/tasks/main.yml b/test/integration/targets/vmware_host_powerstate/tasks/main.yml index a2d9047b370..09ada4a9c63 100644 --- a/test/integration/targets/vmware_host_powerstate/tasks/main.yml +++ b/test/integration/targets/vmware_host_powerstate/tasks/main.yml @@ -3,11 +3,6 @@ # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # TODO: vcsim does not support Powerstate related to operations -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - name: Wait for Flask controller to come up online wait_for: diff --git a/test/integration/targets/vmware_host_scanhba/tasks/main.yml b/test/integration/targets/vmware_host_scanhba/tasks/main.yml index 61d8f747800..4774be4e9b7 100644 --- a/test/integration/targets/vmware_host_scanhba/tasks/main.yml +++ b/test/integration/targets/vmware_host_scanhba/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2019, Michael Eaton # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_service_facts/tasks/main.yml b/test/integration/targets/vmware_host_service_facts/tasks/main.yml index 08ad30ab83b..0d51fa2d91d 100644 --- a/test/integration/targets/vmware_host_service_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_service_facts/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support service related to operations -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_service_manager/tasks/main.yml b/test/integration/targets/vmware_host_service_manager/tasks/main.yml index 786b27938b3..a6a58bc1524 100644 --- a/test/integration/targets/vmware_host_service_manager/tasks/main.yml +++ b/test/integration/targets/vmware_host_service_manager/tasks/main.yml @@ -5,12 +5,6 @@ # TODO: vcsim does not support service management # commenting this testcase till the time. -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_snmp/tasks/main.yml b/test/integration/targets/vmware_host_snmp/tasks/main.yml index 2c28f2312c2..b008f46998d 100644 --- a/test/integration/targets/vmware_host_snmp/tasks/main.yml +++ b/test/integration/targets/vmware_host_snmp/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Christian Kotte # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_ssl_facts/tasks/main.yml b/test/integration/targets/vmware_host_ssl_facts/tasks/main.yml index a39f9409a74..9f2f2ed4c11 100644 --- a/test/integration/targets/vmware_host_ssl_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_ssl_facts/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_vmhba_facts/tasks/main.yml b/test/integration/targets/vmware_host_vmhba_facts/tasks/main.yml index a389f90cb6e..dc97378e8de 100644 --- a/test/integration/targets/vmware_host_vmhba_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_vmhba_facts/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support networkConfig related to operations -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_host_vmnic_facts/tasks/main.yml b/test/integration/targets/vmware_host_vmnic_facts/tasks/main.yml index 85999d1450f..1544e84ed58 100644 --- a/test/integration/targets/vmware_host_vmnic_facts/tasks/main.yml +++ b/test/integration/targets/vmware_host_vmnic_facts/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support networkConfig related to operations -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_inventory/runme.sh b/test/integration/targets/vmware_inventory/runme.sh index 9a713e4f3a8..a4c4bf56056 100755 --- a/test/integration/targets/vmware_inventory/runme.sh +++ b/test/integration/targets/vmware_inventory/runme.sh @@ -9,8 +9,7 @@ contrib_dir=../../../../contrib/inventory echo "DEBUG: using ${contrib_dir}" export ANSIBLE_CONFIG=ansible.cfg -export vcenter_host="${vcenter_host:-0.0.0.0}" -export VMWARE_SERVER="${vcenter_host}" +export VMWARE_SERVER="${VCENTER_HOST}" export VMWARE_USERNAME="${VMWARE_USERNAME:-user}" export VMWARE_PASSWORD="${VMWARE_PASSWORD:-pass}" @@ -42,16 +41,16 @@ function cleanup { fi } -echo "DEBUG: Using ${vcenter_host} with username ${VMWARE_USERNAME} and password ${VMWARE_PASSWORD}" +echo "DEBUG: Using ${VCENTER_HOST} with username ${VMWARE_USERNAME} and password ${VMWARE_PASSWORD}" echo "Kill all previous instances" -curl "http://${vcenter_host}:5000/killall" > /dev/null 2>&1 +curl "http://${VCENTER_HOST}:5000/killall" > /dev/null 2>&1 echo "Start new VCSIM server" -curl "http://${vcenter_host}:5000/spawn?datacenter=1&cluster=1&folder=0" > /dev/null 2>&1 +curl "http://${VCENTER_HOST}:5000/spawn?datacenter=1&cluster=1&folder=0" > /dev/null 2>&1 echo "Debugging new instances" -curl "http://${vcenter_host}:5000/govc_find" +curl "http://${VCENTER_HOST}:5000/govc_find" # Get inventory ansible-playbook -i ./vmware_inventory.sh "./test_vmware_inventory.yml" --connection=local "$@" diff --git a/test/integration/targets/vmware_inventory/test_vmware_inventory.yml b/test/integration/targets/vmware_inventory/test_vmware_inventory.yml index 9cd8ff8917e..4aa994ade06 100644 --- a/test/integration/targets/vmware_inventory/test_vmware_inventory.yml +++ b/test/integration/targets/vmware_inventory/test_vmware_inventory.yml @@ -8,10 +8,7 @@ tasks: - name: store the vcenter container ip set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - - - debug: - var: vcsim + vcsim: "{{ lookup('env', 'VCENTER_HOST') }}" - name: Check that groups present in inventory assert: diff --git a/test/integration/targets/vmware_local_role_facts/tasks/main.yml b/test/integration/targets/vmware_local_role_facts/tasks/main.yml index c8627ebd1d5..c11b066a79a 100644 --- a/test/integration/targets/vmware_local_role_facts/tasks/main.yml +++ b/test/integration/targets/vmware_local_role_facts/tasks/main.yml @@ -11,11 +11,6 @@ - Anonymous - ReadOnly -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_local_role_manager/tasks/main.yml b/test/integration/targets/vmware_local_role_manager/tasks/main.yml index aff9d169040..3de081cbeb2 100644 --- a/test/integration/targets/vmware_local_role_manager/tasks/main.yml +++ b/test/integration/targets/vmware_local_role_manager/tasks/main.yml @@ -2,11 +2,6 @@ # Copyright: (c) 2017-2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_local_user_facts/tasks/main.yml b/test/integration/targets/vmware_local_user_facts/tasks/main.yml index f97ba6d1bc7..53bb188ed99 100644 --- a/test/integration/targets/vmware_local_user_facts/tasks/main.yml +++ b/test/integration/targets/vmware_local_user_facts/tasks/main.yml @@ -5,12 +5,6 @@ # Commenting local user testcases as older vcsim docker image # does not support this. -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_local_user_manager/tasks/main.yml b/test/integration/targets/vmware_local_user_manager/tasks/main.yml index 1ec81e9aba5..db7a582b36d 100644 --- a/test/integration/targets/vmware_local_user_manager/tasks/main.yml +++ b/test/integration/targets/vmware_local_user_manager/tasks/main.yml @@ -5,12 +5,6 @@ # Commenting local user testcases as older vcsim docker image # does not support this. -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_maintenancemode/tasks/main.yml b/test/integration/targets/vmware_maintenancemode/tasks/main.yml index ef5853d3d6f..61060efa1e7 100644 --- a/test/integration/targets/vmware_maintenancemode/tasks/main.yml +++ b/test/integration/targets/vmware_maintenancemode/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2017, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_portgroup_facts/tasks/main.yml b/test/integration/targets/vmware_portgroup_facts/tasks/main.yml index 9beb4b59c4a..c41d95ea284 100644 --- a/test/integration/targets/vmware_portgroup_facts/tasks/main.yml +++ b/test/integration/targets/vmware_portgroup_facts/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_resource_pool/tasks/main.yml b/test/integration/targets/vmware_resource_pool/tasks/main.yml index ab9ed326426..ec40c2a3fa8 100644 --- a/test/integration/targets/vmware_resource_pool/tasks/main.yml +++ b/test/integration/targets/vmware_resource_pool/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2017, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_resource_pool_facts/tasks/main.yml b/test/integration/targets/vmware_resource_pool_facts/tasks/main.yml index 178f888ed7e..fd151e1f5a0 100644 --- a/test/integration/targets/vmware_resource_pool_facts/tasks/main.yml +++ b/test/integration/targets/vmware_resource_pool_facts/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_target_canonical_facts/tasks/main.yml b/test/integration/targets/vmware_target_canonical_facts/tasks/main.yml index 1aa0af8ecd2..46142a0fb46 100644 --- a/test/integration/targets/vmware_target_canonical_facts/tasks/main.yml +++ b/test/integration/targets/vmware_target_canonical_facts/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support SCSI target releated operations -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_vcenter_settings/tasks/main.yml b/test/integration/targets/vmware_vcenter_settings/tasks/main.yml index 04cfd6e59a2..fb375880cc0 100644 --- a/test/integration/targets/vmware_vcenter_settings/tasks/main.yml +++ b/test/integration/targets/vmware_vcenter_settings/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Christian Kotte # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_vcenter_statistics/tasks/main.yml b/test/integration/targets/vmware_vcenter_statistics/tasks/main.yml index c6961b27e79..65fe611b36c 100644 --- a/test/integration/targets/vmware_vcenter_statistics/tasks/main.yml +++ b/test/integration/targets/vmware_vcenter_statistics/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Christian Kotte # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_vm_facts/tasks/main.yml b/test/integration/targets/vmware_vm_facts/tasks/main.yml index 6d29cb9ca4e..6632a2efeb0 100644 --- a/test/integration/targets/vmware_vm_facts/tasks/main.yml +++ b/test/integration/targets/vmware_vm_facts/tasks/main.yml @@ -2,11 +2,6 @@ # Copyright: (c) 2017, Abhijeet Kasurde # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_vm_host_drs_rule/tasks/main.yml b/test/integration/targets/vmware_vm_host_drs_rule/tasks/main.yml index 54e5a1fcebe..275fc35377d 100644 --- a/test/integration/targets/vmware_vm_host_drs_rule/tasks/main.yml +++ b/test/integration/targets/vmware_vm_host_drs_rule/tasks/main.yml @@ -4,11 +4,6 @@ # TODO: vcsim does not support manage DRS rule -- name: Store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: Wait for flask server wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_vm_vm_drs_rule/tasks/main.yml b/test/integration/targets/vmware_vm_vm_drs_rule/tasks/main.yml index b9b833206b1..58c1943ea8a 100644 --- a/test/integration/targets/vmware_vm_vm_drs_rule/tasks/main.yml +++ b/test/integration/targets/vmware_vm_vm_drs_rule/tasks/main.yml @@ -4,11 +4,6 @@ # TODO: vcsim does not support manage DRS rule -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" -- debug: var=vcsim - - name: wait for flask server wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_vmkernel/tasks/main.yml b/test/integration/targets/vmware_vmkernel/tasks/main.yml index a015b96cf76..122e04a15d7 100644 --- a/test/integration/targets/vmware_vmkernel/tasks/main.yml +++ b/test/integration/targets/vmware_vmkernel/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support HostVirtualNicManager-related operations -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_vmkernel_facts/tasks/main.yml b/test/integration/targets/vmware_vmkernel_facts/tasks/main.yml index 1c71afb8436..61396c8c300 100644 --- a/test/integration/targets/vmware_vmkernel_facts/tasks/main.yml +++ b/test/integration/targets/vmware_vmkernel_facts/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support HostVirtualNicManager related to operations -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_vspan_session/tasks/main.yml b/test/integration/targets/vmware_vspan_session/tasks/main.yml index 27607e20064..f3a33d8c373 100644 --- a/test/integration/targets/vmware_vspan_session/tasks/main.yml +++ b/test/integration/targets/vmware_vspan_session/tasks/main.yml @@ -2,12 +2,6 @@ # Copyright: (c) 2018, Peter Gyorgy # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/integration/targets/vmware_vswitch/tasks/main.yml b/test/integration/targets/vmware_vswitch/tasks/main.yml index e30496680a0..4532e58c0eb 100644 --- a/test/integration/targets/vmware_vswitch/tasks/main.yml +++ b/test/integration/targets/vmware_vswitch/tasks/main.yml @@ -4,13 +4,6 @@ # TODO: akasurde: VCSIM does not suport network manager system -- name: store the vcenter container ip - set_fact: - vcsim: '{{ lookup("env", "vcenter_host") }}' - -- debug: - var: vcsim - - name: Wait for Flask controller to come up online wait_for: host: '{{ vcsim }}' diff --git a/test/integration/targets/vmware_vswitch_facts/tasks/main.yml b/test/integration/targets/vmware_vswitch_facts/tasks/main.yml index 4b818b0a14e..937f1e026a6 100644 --- a/test/integration/targets/vmware_vswitch_facts/tasks/main.yml +++ b/test/integration/targets/vmware_vswitch_facts/tasks/main.yml @@ -4,12 +4,6 @@ # TODO: vcsim does not support networkConfig related to operations -- name: store the vcenter container ip - set_fact: - vcsim: "{{ lookup('env', 'vcenter_host') }}" - -- debug: var=vcsim - - name: Wait for Flask controller to come up online wait_for: host: "{{ vcsim }}" diff --git a/test/runner/lib/cloud/vcenter.py b/test/runner/lib/cloud/vcenter.py index cfccd4665e8..cb2c59f7807 100644 --- a/test/runner/lib/cloud/vcenter.py +++ b/test/runner/lib/cloud/vcenter.py @@ -149,6 +149,8 @@ class VcenterEnvironment(CloudEnvironment): :type env: dict[str, str] :type cmd: list[str] """ + cmd.append('-e') + cmd.append('vcsim=%s' % self._get_cloud_config('vcenter_host')) # Send the container IP down to the integration test(s) - env['vcenter_host'] = self._get_cloud_config('vcenter_host') + env['VCENTER_HOST'] = self._get_cloud_config('vcenter_host')