diff options
author | pmikus <peter.mikus@protonmail.ch> | 2024-07-16 13:49:01 +0200 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2024-07-16 12:03:17 +0000 |
commit | feccb55434c76f8cb633d816f76f556a70d54058 (patch) | |
tree | 4db99c33fcc4efca5736347a42033ba0c105d562 /resources/libraries/bash/function/ansible.sh | |
parent | d84cd31024120c6da4fd90b16acfe226e140e0a6 (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.sh | 24 |
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" ;; *) |