diff options
author | Stefan Wold <swold@sunet.se> | 2014-02-24 08:13:53 +0100 |
---|---|---|
committer | Stefan Wold <swold@sunet.se> | 2014-02-24 08:13:53 +0100 |
commit | 5c171118c151c9724b1576017da02a93a350c5ae (patch) | |
tree | e928272ab874f72e8b36220503cea8663515d0c3 /global | |
parent | 31772848b3dfcf53971ae1a98020e1ff8875aa90 (diff) |
Allow installing puppet modules using the standard method
Diffstat (limited to 'global')
-rwxr-xr-x | global/post-tasks.d/018packages | 9 |
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 ) |