diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-06-24 12:56:03 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-06-24 12:56:03 -0300 |
commit | e30a586d269c3f1b90d04b5c73d0a3407bf22291 (patch) | |
tree | 707bdea1b8f142ff03c55d88d9c92a2ad59f5406 /lib | |
parent | 22a5da3bb6931d28ad47acb52ff28e0246e3364a (diff) | |
download | hydra-e30a586d269c3f1b90d04b5c73d0a3407bf22291.tar.gz hydra-e30a586d269c3f1b90d04b5c73d0a3407bf22291.tar.bz2 |
Deploy: error handling
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hydra/deploy | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/hydra/deploy b/lib/hydra/deploy index 333f183..84e31a2 100644 --- a/lib/hydra/deploy +++ b/lib/hydra/deploy @@ -204,6 +204,12 @@ function hydra_deploy_copy { $SUDO cp $orig $dest elif [ "$location" == "remote" ]; then $DEPLOY_RSYNC "$RSYNC_PATH" $orig $dest + + # Check result + if [ "$?" != "0" ]; then + echo "Error copying data to $FQDN." + exit 1 + fi fi } @@ -215,5 +221,11 @@ function hydra_deploy_facts_collect { $SUDO facter --yaml > $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml elif [ "$1" == "remote" ]; then $HYDRA_CONNECT $FQDN sudo facter --yaml > $HYDRA_FOLDER/puppet/config/facts/$FQDN.yaml + + # Check result + if [ "$?" != "0" ]; then + echo "Error retrieving facts from $FQDN." + exit 1 + fi fi } |