- metrics and alarms subsystem.
- deploy:
- lockfile.
- - error handling.
- log applied version and date (in the node and in the repo).
$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
}
$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
}
hydra_deploy_setup remote $node
# Check if puppet is installed
- $HYDRA_CONNECT $node <<EOF
+ $HYDRA_CONNECT $FQDN <<EOF
##### BEGIN REMOTE SCRIPT #####
if ! which puppet &> /dev/null; then
echo "Installing dependencies..."
##### END REMOTE SCRIPT #######
EOF
+ # Check connection
+ if [ "$?" != "0" ]; then
+ echo "Error connecting or setting up $FQDN."
+ exit 1
+ fi
+
# Create folders
hydra_deploy_mkdirs