open-nomad/scripts/vagrant-linux-priv-consul.sh
Mahmood Ali 1bac665cbf Update Vagrant consul/vault deps
Update Vagrant setup to use the consul/vault versions used in CI.
2020-09-29 11:06:53 -04:00

23 lines
470 B
Bash
Executable file

#!/usr/bin/env bash
set -o errexit
VERSION="1.8.3"
DOWNLOAD=https://releases.hashicorp.com/consul/${VERSION}/consul_${VERSION}_linux_amd64.zip
function install_consul() {
if [[ -e /usr/bin/consul ]] ; then
if [ "v${VERSION}" == "$(consul version | head -n1 | awk '{print $2}')" ] ; then
return
fi
fi
curl -sSL --fail -o /tmp/consul.zip ${DOWNLOAD}
unzip -d /tmp /tmp/consul.zip
mv /tmp/consul /usr/bin/consul
chmod +x /usr/bin/consul
}
install_consul