Commit 7fcd73f7 authored by Cool Fire's avatar Cool Fire
Browse files

Wrap deploy in case ssh fails

parent fd497d34
......@@ -30,7 +30,7 @@ deploy:
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- ssh puppet.insomnia247.nl "cd /etc/puppetlabs/code/environments/production && git pull && librarian-puppet install && systemctl reload puppetserver"
- bash deploy.sh
tags:
- puppet
only:
......
#!/usr/bin/bash
for c in {1..4}
do
ssh puppet.insomnia247.nl "cd /etc/puppetlabs/code/environments/production && git pull && systemctl reload puppetserver" && break || sleep 3 && echo "retry"
done
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment