Created
July 9, 2015 03:52
-
-
Save bodepd/1af9b3bbe6cc0eea7dfa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true | |
do | |
# first install all packages to make the build as fast as possible | |
puppet apply --detailed-exitcodes \`puppet config print default_manifest\` --config_version='echo packages' --tags package | |
ret_code_package=\$? | |
# now perform base config | |
(echo 'File<| title == "/etc/consul" |> { purge => false }'; echo 'include rjil::jiocloud' ) | puppet apply --config_version='echo bootstrap' --detailed-exitcodes --debug | |
ret_code_jio=\$? | |
if [[ \$ret_code_jio = 1 || \$ret_code_jio = 4 || \$ret_code_jio = 6 || \$ret_code_package = 1 || \$ret_code_package = 4 || \$ret_code_package = 6 ]] | |
then | |
echo "Puppet failed. Will retry in 5 seconds" | |
sleep 5 | |
else | |
break | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment