From b71aac9793dfb1f54b4568c3feeafd7a4d0b5919 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Tue, 3 Sep 2013 11:31:05 +0200 Subject: move package install to post-tasks before puppet --- global/post-tasks.d/018packages | 16 ++++++++++++++++ global/pre-tasks.d/030puppet | 15 --------------- 2 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 global/post-tasks.d/018packages (limited to 'global') diff --git a/global/post-tasks.d/018packages b/global/post-tasks.d/018packages new file mode 100644 index 0000000..9e25e69 --- /dev/null +++ b/global/post-tasks.d/018packages @@ -0,0 +1,16 @@ +#!/bin/sh + +python -c "import yaml" 2>/dev/null || apt-get -y install python-yaml + +if [ -f /etc/puppet/cosmos-modules.conf ]; then + grep -E -v "^#" /etc/puppet/cosmos-modules.conf | ( + cd /etc/puppet/modules && while read module src update; do + if [ ! -d /etc/puppet/modules/$module ]; then + echo $src | grep -q "://" && git clone $src $module || puppet module install $src + else + if [ "x$update" = "xyes" ]; then + echo $src | grep -q "://" && (cd /etc/puppet/modules/$module && git pull -q) || puppet module upgrade $src + fi + fi + done) +fi diff --git a/global/pre-tasks.d/030puppet b/global/pre-tasks.d/030puppet index 2dc0b80..cdc9989 100755 --- a/global/pre-tasks.d/030puppet +++ b/global/pre-tasks.d/030puppet @@ -18,18 +18,3 @@ if ! test -f $stamp -a -f /usr/bin/puppet; then mkdir -p `dirname $stamp` touch $stamp fi - -python -c "import yaml" 2>/dev/null || apt-get -y install python-yaml - -if [ -f /etc/puppet/cosmos-modules.conf ]; then - grep -E -v "^#" /etc/puppet/cosmos-modules.conf | ( - cd /etc/puppet/modules && while read module src update; do - if [ ! -d /etc/puppet/modules/$module ]; then - echo $src | grep -q "://" && git clone $src $module || puppet module install $src - else - if [ "x$update" = "xyes" ]; then - echo $src | grep -q "://" && (cd /etc/puppet/modules/$module && git pull -q) || puppet module upgrade $src - fi - fi - done) -fi -- cgit v1.1