aboutsummaryrefslogtreecommitdiff
path: root/share/hydra/deploy
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-09-21 12:48:55 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-09-21 12:48:55 -0300
commite81b332b0bc6e11cae63372a0418830939655c2b (patch)
tree6017bda444139e2516f9b3baedc1e99bfe666bd5 /share/hydra/deploy
parenta7ca30e854f845f670c852a2edd5ef13656c774f (diff)
downloadhydra-e81b332b0bc6e11cae63372a0418830939655c2b.tar.gz
hydra-e81b332b0bc6e11cae63372a0418830939655c2b.tar.bz2
Check for sudo config at the remote site
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