From 2eb5f6b15fcd8c812fa7af4fc87e088be180c169 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Thu, 30 Sep 2021 16:58:43 +0000 Subject: [PATCH] Use more restrictive shell options --- deploy.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index a011f52..81b2846 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,12 +1,16 @@ #!/bin/sh +set -eu + # run sudo to cache creds sudo /bin/true # update modules and check depencies git pull git submodule update --init --recursive -rpm -q ansible > /dev/null || sudo yum -y install ansible +if ! rpm -q ansible > /dev/null; then + sudo yum -y install ansible +fi # run playbook ansible-playbook deploy.yml