aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-06-24 13:26:38 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-06-24 13:26:38 -0300
commite665f7cd208739df84373f0f65184c6b561e3de2 (patch)
treecee1b55781a1c526b988977731659b760ddebb87 /share
parentc3f5e9fbb489be5f7695b36380637d0b2349a12a (diff)
downloadhydra-e665f7cd208739df84373f0f65184c6b561e3de2.tar.gz
hydra-e665f7cd208739df84373f0f65184c6b561e3de2.tar.bz2
Deploy: log support
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydra/deploy9
1 files changed, 6 insertions, 3 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy
index 38d8bcb..3cec85f 100755
--- a/share/hydra/deploy
+++ b/share/hydra/deploy
@@ -73,7 +73,8 @@ for node in $NODES; do
# Run puppet, overriding FQDN
echo "Applying configuration..."
- LC_ALL=C HOSTNAME=$FQDN FACTER_domain=$DOMAIN FACTER_hostname=$FQDN FACTER_fqdn=$HOSTNAME.$DOMAIN $DEPLOY_APPLY
+ LC_ALL=C HOSTNAME=$FQDN FACTER_domain=$DOMAIN FACTER_hostname=$FQDN FACTER_fqdn=$HOSTNAME.$DOMAIN $DEPLOY_APPLY 2>&1 | \
+ tee $HYDRA_FOLDER/puppet/logs/$FQDN.`date +%Y%M%d%H%M`.log
elif [ "$node" == "localhost" ] || [ "$node" == "`facter fqdn`" ] || [ "$node" == "`facter hostname`" ]; then
echo "Deploying to localhost..."
@@ -94,7 +95,8 @@ for node in $NODES; do
# Run puppet
echo "Applying configuration..."
- $DEPLOY_APPLY
+ $DEPLOY_APPLY 2>&1 | \
+ tee $HYDRA_FOLDER/puppet/logs/$FQDN.`date +%Y%M%d%H%M`.log
else
echo "Deploying to $node..."
@@ -142,6 +144,7 @@ EOF
# Run puppet
echo "Applying configuration..."
- $DEPLOY_APPLY
+ $DEPLOY_APPLY 2>&1 | \
+ tee $HYDRA_FOLDER/puppet/logs/$FQDN.`date +%Y%M%d%H%M`.log
fi
done