From a8d6b5f8e17c703be63efc064dbb2c83a8e9e719 Mon Sep 17 00:00:00 2001 From: Leap Admins Date: Sun, 5 May 2013 07:24:15 +0000 Subject: SERVICES -> NODES, updated for newest leap_cli output --- leap-deploy-node.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'leap-deploy-node.sh') diff --git a/leap-deploy-node.sh b/leap-deploy-node.sh index b24e1ee..039f635 100755 --- a/leap-deploy-node.sh +++ b/leap-deploy-node.sh @@ -15,8 +15,8 @@ RMCOLORS='s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' # we need to deploy with verbose level 2, and filter out unwanted stuff # until puppet errors show up in verbose level 0 +1 (#1750) -FILTER_CLI='= read|= loading|= no change| - executing| = executing| = applying| = ran git| = checking| = synching| = skipping file_path| - rsync| - hiera| - cd /root/| - rolling backexecuting| - files/ca/client_ca.crt' -FILTER_PUPPET='] notice: | - Puppet apply complete.|] warning: Dynamic lookup|] warning: Scope\(Class' +FILTER_CLI='= read|= loading|= no change| - executing| = executing| = applying| = ran git| = checking| = synching| = skipping file_path| - cd .*; rsync -a| - hiera| = created hiera/| - cd /root/| - rolling backexecuting| - files/ca/client_ca.crt|\[bin,puppet\] ->' +FILTER_PUPPET='] notice: |] No change to hostname|] Puppet apply complete|] warning: Dynamic lookup|] warning: Scope\(Class' FILTER_ALL="($FILTER_CLI|$FILTER_PUPPET)" @@ -29,11 +29,13 @@ if [ $? -eq 0 ] then msg="From: $MAIL_FROM\nTo: $MAIL_TO\nSubject: Deploy to \"$vm\" had errors !\n\n`cat $ERRLOG`" echo "Deploy to \"$vm\" on `date` had errors." | tee -a $LOG - echo "Sending this mail:" echo cat $ERRLOG - printf "$msg" | sendmail -t + if [ "$MAIL_TO" != '' ]; then + echo "Sending this mail to $MAIL_TO:" + printf "$msg" | sendmail -t + fi else echo "Deploy to $vm on `date` went fine."| tee -a $LOG -- cgit v1.2.3