aboutsummaryrefslogtreecommitdiff
path: root/share/hydra/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'share/hydra/deploy')
-rwxr-xr-xshare/hydra/deploy15
1 files changed, 15 insertions, 0 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy
index 3cec85f..8c45828 100755
--- a/share/hydra/deploy
+++ b/share/hydra/deploy
@@ -51,6 +51,11 @@ for node in $NODES; do
FOLDER=$node
hydra_deploy_setup folder $FOLDER || continue
+ if ! sudo -n true; then
+ echo "Please set passwordless sudo on localhost."
+ continue
+ fi
+
# Check if puppet is installed
if [ ! -e "$FOLDER/usr/bin/puppet" ]; then
echo "Installing dependencies..."
@@ -78,6 +83,11 @@ for node in $NODES; do
elif [ "$node" == "localhost" ] || [ "$node" == "`facter fqdn`" ] || [ "$node" == "`facter hostname`" ]; then
echo "Deploying to localhost..."
+ if ! sudo -n true; then
+ echo "Please set passwordless sudo on localhost."
+ continue
+ fi
+
# Setup deploy environment
hydra_deploy_setup || continue
@@ -106,6 +116,11 @@ for node in $NODES; do
# Check if puppet is installed
$HYDRA_CONNECT $FQDN <<EOF
##### BEGIN REMOTE SCRIPT #####
+ if ! sudo -n true; then
+ echo "Please set passwordless sudo on $FQDN."
+ exit 1
+ fi
+
if ! which puppet &> /dev/null; then
echo "Installing dependencies..."
sudo apt-get update