X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Ffunction%2Fansible.sh;h=1263412dd51ca6acab9eecce2bf563ca6c9c365f;hp=64508bda111d1646626b9dde467b1a8bb887da93;hb=HEAD;hpb=647a693a245ae450756fb3bd9446db856e712812 diff --git a/resources/libraries/bash/function/ansible.sh b/resources/libraries/bash/function/ansible.sh index 64508bda11..6cf4d16f43 100644 --- a/resources/libraries/bash/function/ansible.sh +++ b/resources/libraries/bash/function/ansible.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2024 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -28,9 +28,12 @@ function ansible_adhoc () { set -exuo pipefail case "$FLAVOR" in - "aws") + "aws" | "c6in" | "c6gn" | "c7gn") INVENTORY_PATH="cloud_inventory" ;; + "x-"*) + INVENTORY_PATH="external_inventory" + ;; *) INVENTORY_PATH="lf_inventory" ;; @@ -70,9 +73,12 @@ function ansible_playbook () { set -exuo pipefail case "$FLAVOR" in - "aws") + "aws" | "c6in" | "c6gn" | "c7gn") INVENTORY_PATH="cloud_inventory" ;; + "x-"*) + INVENTORY_PATH="external_inventory" + ;; *) INVENTORY_PATH="lf_inventory" ;;