diff --git a/inst-raps.sh b/inst-raps.sh index c3321dd..daf49bb 100755 --- a/inst-raps.sh +++ b/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 #-----------------------------------------------------------------------------