diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-06-24 13:12:15 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-06-24 13:12:15 -0300 |
commit | c3f5e9fbb489be5f7695b36380637d0b2349a12a (patch) | |
tree | a7298a384d69eeb41adec647908d1c2f266ba1fa /share | |
parent | e30a586d269c3f1b90d04b5c73d0a3407bf22291 (diff) | |
download | hydra-c3f5e9fbb489be5f7695b36380637d0b2349a12a.tar.gz hydra-c3f5e9fbb489be5f7695b36380637d0b2349a12a.tar.bz2 |
Deploy: do not globally abort on failures to apply in a node
Diffstat (limited to 'share')
-rwxr-xr-x | share/hydra/deploy | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy index e55e545..38d8bcb 100755 --- a/share/hydra/deploy +++ b/share/hydra/deploy @@ -49,7 +49,7 @@ for node in $NODES; do # Setup deploy environment FOLDER=$node - hydra_deploy_setup folder $FOLDER + hydra_deploy_setup folder $FOLDER || continue # Check if puppet is installed if [ ! -e "$FOLDER/usr/bin/puppet" ]; then @@ -78,7 +78,7 @@ for node in $NODES; do echo "Deploying to localhost..." # Setup deploy environment - hydra_deploy_setup + hydra_deploy_setup || continue # Ensure key availability hydra $HYDRA eyaml $FQDN @@ -99,7 +99,7 @@ for node in $NODES; do echo "Deploying to $node..." # Setup deploy environment - hydra_deploy_setup remote $node + hydra_deploy_setup remote $node || continue # Check if puppet is installed $HYDRA_CONNECT $FQDN <<EOF @@ -115,24 +115,30 @@ EOF # Check connection if [ "$?" != "0" ]; then echo "Error connecting or setting up $FQDN." - exit 1 + continue fi # Create folders hydra_deploy_mkdirs # Collect facts - hydra_deploy_facts_collect remote + hydra_deploy_facts_collect remote || continue # Sync repository to server echo "Syncing configuration..." $DEPLOY_RSYNC "$RSYNC_PATH" $DEPLOY_OPTS + # Check connection + if [ "$?" != "0" ]; then + echo "Error syncing to $FQDN." + continue + fi + # Copy keys - hydra_deploy_copy_keys remote + hydra_deploy_copy_keys remote || continue # Copy configuration - hydra_deploy_copy_secrets remote + hydra_deploy_copy_secrets remote || continue # Run puppet echo "Applying configuration..." |