drive-ops/global/post-tasks.d/030puppet

17 lines
372 B
Plaintext
Raw Normal View History

2013-09-02 14:01:50 +00:00
#!/bin/sh
set -e
2013-09-02 14:01:50 +00:00
if [ "x$COSMOS_VERBOSE" = "xy" ]; then
args="--verbose --show_diff"
2013-09-02 14:01:50 +00:00
else
args="--logdest=syslog"
fi
if [ -f /usr/bin/puppet ] && [ -d /etc/puppet/manifests ]; then
find /etc/puppet/manifests -name \*.pp | while read -r m; do
test "x$COSMOS_VERBOSE" = "xy" && echo "$0: Applying Puppet manifest $m"
puppet apply $args $m
2013-09-02 14:01:50 +00:00
done
fi