summaryrefslogtreecommitdiff
path: root/leap-deploy-node.sh
diff options
context:
space:
mode:
Diffstat (limited to 'leap-deploy-node.sh')
-rwxr-xr-xleap-deploy-node.sh10
1 files changed, 6 insertions, 4 deletions
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