From 3b3b274ab03b6b830984c8edde93416d70e414dd Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sun, 26 Apr 2020 16:41:22 +0200 Subject: [PATCH] updated provision.sh --- provision.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/provision.sh b/provision.sh index 9641659..a3e8c3e 100755 --- a/provision.sh +++ b/provision.sh @@ -5,6 +5,7 @@ remote_file_url="https://git.paulbsd.com/paulbsd/ansible-gnu-corporate-workstati tmp_dir="/tmp" archive_file="/tmp/ansible-gnu-corporate-workstation-master.zip" working_directory="/tmp/ansible-gnu-corporate-workstation" +playbook_file="playbook.yml" update() { @@ -15,13 +16,13 @@ update() fetch_archive() { wget -O ${archive_file} ${remote_file_url} - unzip -o -d /tmp /tmp/master.zip + unzip -o -d ${tmp_dir} ${archive_file} } run_playbook() { cd ${working_directory} - sudo ansible-playbook -i hosts playbook.yml + sudo ansible-playbook -i hosts ${playbook_file} cd ${tmp_dir} } @@ -42,5 +43,5 @@ echo "Let's extract the archive ..." if [[ -f ${archive_file} ]] then echo "Let's go ..." - run_playbook ${working_directory} && cleanup + run_playbook && cleanup fi