aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/bash/function/ansible.sh
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2024-07-16 13:49:01 +0200
committerPeter Mikus <peter.mikus@protonmail.ch>2024-07-16 12:03:17 +0000
commitfeccb55434c76f8cb633d816f76f556a70d54058 (patch)
tree4db99c33fcc4efca5736347a42033ba0c105d562 /resources/libraries/bash/function/ansible.sh
parentd84cd31024120c6da4fd90b16acfe226e140e0a6 (diff)
feat(core): Change external testbed detection"
Signed-off-by: Peter Mikus <peter.mikus@protonmail.ch> Change-Id: Id005feac8104bb0b7da08d8dd9baaa3c5117e157
Diffstat (limited to 'resources/libraries/bash/function/ansible.sh')
-rw-r--r--resources/libraries/bash/function/ansible.sh24
1 files changed, 18 insertions, 6 deletions
diff --git a/resources/libraries/bash/function/ansible.sh b/resources/libraries/bash/function/ansible.sh
index 6cf4d16f43..587c59cba7 100644
--- a/resources/libraries/bash/function/ansible.sh
+++ b/resources/libraries/bash/function/ansible.sh
@@ -27,11 +27,17 @@ function ansible_adhoc () {
set -exuo pipefail
- case "$FLAVOR" in
- "aws" | "c6in" | "c6gn" | "c7gn")
+ case "${TEST_CODE}" in
+ *"1n-aws" | *"2n-aws" | *"3n-aws")
INVENTORY_PATH="cloud_inventory"
;;
- "x-"*)
+ *"2n-c7gn" | *"3n-c7gn")
+ INVENTORY_PATH="cloud_inventory"
+ ;;
+ *"1n-c6in" | *"2n-c6in" | *"3n-c6in")
+ INVENTORY_PATH="cloud_inventory"
+ ;;
+ *"-x-2n"* | *"-x-3n"*)
INVENTORY_PATH="external_inventory"
;;
*)
@@ -72,11 +78,17 @@ function ansible_playbook () {
set -exuo pipefail
- case "$FLAVOR" in
- "aws" | "c6in" | "c6gn" | "c7gn")
+ case "${TEST_CODE}" in
+ *"1n-aws" | *"2n-aws" | *"3n-aws")
+ INVENTORY_PATH="cloud_inventory"
+ ;;
+ *"2n-c7gn" | *"3n-c7gn")
+ INVENTORY_PATH="cloud_inventory"
+ ;;
+ *"1n-c6in" | *"2n-c6in" | *"3n-c6in")
INVENTORY_PATH="cloud_inventory"
;;
- "x-"*)
+ *"-x-2n"* | *"-x-3n"*)
INVENTORY_PATH="external_inventory"
;;
*)