summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wold <swold@sunet.se>2014-02-24 08:13:53 +0100
committerStefan Wold <swold@sunet.se>2014-02-24 08:13:53 +0100
commit5c171118c151c9724b1576017da02a93a350c5ae (patch)
treee928272ab874f72e8b36220503cea8663515d0c3
parent31772848b3dfcf53971ae1a98020e1ff8875aa90 (diff)
Allow installing puppet modules using the standard method
-rwxr-xr-xglobal/post-tasks.d/018packages9
1 files changed, 9 insertions, 0 deletions
diff --git a/global/post-tasks.d/018packages b/global/post-tasks.d/018packages
index bf7bf64..cc5856e 100755
--- a/global/post-tasks.d/018packages
+++ b/global/post-tasks.d/018packages
@@ -39,6 +39,15 @@ if [ -f $CONFIG ]; then
echo "ERROR: Ignoring non-git repository"
continue
fi
+ elif [[ "$src" =~ .*:// ]]; then
+ echo "ERROR: Don't know how to install '$src'"
+ continue
+ else
+ if [ ! -d /etc/puppet/modules/$module ]; then
+ puppet module install $src
+ elif [ "$update" = "yes" ]; then
+ puppet module upgrade $src
+ fi
fi
done
)