add check vault_pass file
This commit is contained in:
parent
9849f32eb5
commit
e48ef91265
16
inst-raps.sh
16
inst-raps.sh
@ -137,14 +137,6 @@ chronyc -a makestep
|
||||
if [ $? -ne 0 ]; then printError "Problem to update date and time";exit; fi
|
||||
printSuccess "Date and Time updated successfully"
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# execute playbook
|
||||
#-----------------------------------------------------------------------------
|
||||
printInfo "Execute playbook"
|
||||
~/.local/bin/ansible-playbook main.yml --vault-password-file ~/ansible/.vault_pass.txt
|
||||
if [ $? -ne 0 ]; then printError "Problem to execute playbook";exit; fi
|
||||
printSuccess "Ansible playbook finished"
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# check /root/ansible/.vault_pass.txt exits
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -155,6 +147,14 @@ if [ ! -f "/root/ansible/.vault_pass.txt"]; then
|
||||
fi
|
||||
printSuccess "/root/ansible/.vault_pass.txt exist"
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# execute playbook
|
||||
#-----------------------------------------------------------------------------
|
||||
printInfo "Execute playbook"
|
||||
~/.local/bin/ansible-playbook main.yml --vault-password-file ~/ansible/.vault_pass.txt
|
||||
if [ $? -ne 0 ]; then printError "Problem to execute playbook";exit; fi
|
||||
printSuccess "Ansible playbook finished"
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# set timezone
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user