From e81b332b0bc6e11cae63372a0418830939655c2b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 21 Sep 2016 12:48:55 -0300 Subject: Check for sudo config at the remote site --- share/hydra/deploy | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'share') 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 < /dev/null; then echo "Installing dependencies..." sudo apt-get update -- cgit v1.2.3