From 751ea7a2e34ad9ea921d9b282e0ec4eb34156f2a Mon Sep 17 00:00:00 2001 From: Mike Morency Date: Tue, 31 Dec 2024 10:25:39 -0500 Subject: [PATCH] move vcenter name to a var --- tests/integration/targets/prepare_lab/tasks/main.yml | 3 +-- tests/integration/targets/prepare_lab/vars/main.yml | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 tests/integration/targets/prepare_lab/vars/main.yml diff --git a/tests/integration/targets/prepare_lab/tasks/main.yml b/tests/integration/targets/prepare_lab/tasks/main.yml index 7b5cfd70..6f081aa3 100644 --- a/tests/integration/targets/prepare_lab/tasks/main.yml +++ b/tests/integration/targets/prepare_lab/tasks/main.yml @@ -2,8 +2,7 @@ - name: Fail If Running On Eco vCenter ansible.builtin.fail: msg: This test is very desctuctive and should only be run on Zuul! - when: >- - lookup('ansible.builtin.env', 'VCENTER_HOSTNAME') == "eco-vcenter-server.lab.eng.tlv2.redhat.com" + when: lookup('ansible.builtin.env', 'VCENTER_HOSTNAME') in prepare_lab_restricted_vcenters - include_tasks: purge_vms.yml - include_tasks: purge_libraries.yml diff --git a/tests/integration/targets/prepare_lab/vars/main.yml b/tests/integration/targets/prepare_lab/vars/main.yml new file mode 100644 index 00000000..65307cce --- /dev/null +++ b/tests/integration/targets/prepare_lab/vars/main.yml @@ -0,0 +1,3 @@ +--- +prepare_lab_restricted_vcenters: + - eco-vcenter-server.lab.eng.tlv2.redhat.com