From f6f9af8dc2e437e03c48ba4524e26bc632f9e31f Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Wed, 24 Mar 2021 10:43:13 +0100 Subject: [PATCH] Adding ansible install --- fabrica | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fabrica b/fabrica index ffde790..9c75f7c 100755 --- a/fabrica +++ b/fabrica @@ -19,19 +19,22 @@ function install_hashicorp_tools() { packer_version="1.6.1" terraform_version="0.14.3" + ansible_version="2.10.2" if [[ ${DISTRIB_ID} == "ManjaroLinux" ]] then pacman -Syq make terraform packer --noconfirm return ${?} elif [[ ${DISTRIB_ID} == "Ubuntu" ]] then + apt-get update apt-get -y install software-properties-common make gpg_key_url="https://apt.releases.hashicorp.com/gpg" curl -fsSL ${gpg_key_url} | apt-key add - apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" + apt-add-repository --yes --update ppa:ansible/ansible apt-get update - apt-get -y install --allow-downgrades terraform=${terraform_version} packer=${packer_version} + apt-get -y install --allow-downgrades ansible=${ansible_version} terraform=${terraform_version} packer=${packer_version} return ${?} fi }