Skip to content

Commit

Permalink
make sure prepare_lab is only run on zuul
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemorency committed Dec 27, 2024
1 parent 0e74dec commit b3e9f7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/572-restrict-prepare_lab-runs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
trivial:
- prepare_lab - make sure tests are not accidentally run against eco vcenter
7 changes: 7 additions & 0 deletions tests/integration/targets/prepare_lab/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
- 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"
- include_tasks: purge_vms.yml
- include_tasks: purge_libraries.yml
- include_tasks: cleanup.yml
Expand Down

0 comments on commit b3e9f7e

Please sign in to comment.