From 9849f32eb569377c802b64742cb29d2854b5e632 Mon Sep 17 00:00:00 2001 From: Gilles Mouchet Date: Wed, 22 May 2024 00:11:53 +0200 Subject: [PATCH] add check vault_pass file --- inst-raps.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/inst-raps.sh b/inst-raps.sh index 3b5ebb7..c3321dd 100755 --- a/inst-raps.sh +++ b/inst-raps.sh @@ -145,6 +145,16 @@ printInfo "Execute playbook" if [ $? -ne 0 ]; then printError "Problem to execute playbook";exit; fi printSuccess "Ansible playbook finished" +#----------------------------------------------------------------------------- +# check /root/ansible/.vault_pass.txt exits +#----------------------------------------------------------------------------- +printInfo "Check /root/ansible/.vault_pass.txt" +if [ ! -f "/root/ansible/.vault_pass.txt"]; then + printError "You must create /root/ansible/.vault_pass.txt" + exit +fi +printSuccess "/root/ansible/.vault_pass.txt exist" + #----------------------------------------------------------------------------- # set timezone #-----------------------------------------------------------------------------