aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/bash/function/terraform.sh
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-07-26 12:54:58 +0000
committerPeter Mikus <pmikus@cisco.com>2021-07-26 12:57:40 +0000
commitb27f2c7cbfe08712a00959c8cc6a2f618a25b3e7 (patch)
treeb166a1deebfde2c4e6c7409c5938917a1b7e69fc /resources/libraries/bash/function/terraform.sh
parenta4fe771848907ee4a551cf06432f1ec6da496608 (diff)
Infra: Terraform add ansible plugin init
+ Manual override Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: If296d28dc3eaa023c935a0887a14ac10e83076ba
Diffstat (limited to 'resources/libraries/bash/function/terraform.sh')
-rw-r--r--resources/libraries/bash/function/terraform.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/resources/libraries/bash/function/terraform.sh b/resources/libraries/bash/function/terraform.sh
index 209227a024..29a2177bd6 100644
--- a/resources/libraries/bash/function/terraform.sh
+++ b/resources/libraries/bash/function/terraform.sh
@@ -82,6 +82,16 @@ function terraform_init () {
pushd "${NODENESS}_${FLAVOR}_c5n" || die "Pushd failed!"
export TF_LOG=INFO
terraform init || die "Failed to run terraform init!"
+
+ plugin_url="https://github.com/radekg/terraform-provisioner-ansible/"
+ plugin_url+="releases/download/v2.5.0/"
+ plugin_url+="terraform-provisioner-ansible-linux-amd64_v2.5.0"
+ plugin_dir="${HOME}/.terraform.d/plugins/"
+ plugin_path+="${plugin_dir}terraform-provisioner-ansible-linux-amd64_v2.5.0"
+
+ mkdir -p "${plugin_dir}" || die "Failed to create dir!"
+ wget -O "${plugin_path}" "${plugin_url}" || die "Failed to download plugin!"
+
popd || die "Popd failed!"
popd || die "Popd failed!"
}