diff options
-rwxr-xr-x | global/post-tasks.d/020reports | 4 | ||||
-rwxr-xr-x | global/post-tasks.d/030puppet | 4 | ||||
-rwxr-xr-x | global/post-tasks.d/099autoremove | 6 | ||||
-rwxr-xr-x | global/pre-tasks.d/020common-tools | 4 | ||||
-rwxr-xr-x | global/pre-tasks.d/040hiera-gpg | 7 |
5 files changed, 14 insertions, 11 deletions
diff --git a/global/post-tasks.d/020reports b/global/post-tasks.d/020reports index 091a236..380f31a 100755 --- a/global/post-tasks.d/020reports +++ b/global/post-tasks.d/020reports @@ -1,4 +1,4 @@ #!/bin/sh -rm -f /var/run/facts.json -facter -p -y > /var/run/facts.yaml +#rm -f /var/run/facts.json +#facter -p -y > /var/run/facts.yaml diff --git a/global/post-tasks.d/030puppet b/global/post-tasks.d/030puppet index b94b9ff..6742949 100755 --- a/global/post-tasks.d/030puppet +++ b/global/post-tasks.d/030puppet @@ -1,13 +1,13 @@ #!/bin/sh if [ "x$COSMOS_VERBOSE" = "xy" ]; then - args="--verbose --show_diff" + args="--verbose" else args="--logdest=syslog" fi if [ -f /usr/bin/puppet -a -d /etc/puppet/manifests ]; then for m in `find /etc/puppet/manifests -name \*.pp`; do - puppet apply $args $m + puppet apply $args < $m done fi diff --git a/global/post-tasks.d/099autoremove b/global/post-tasks.d/099autoremove index 74b0aa4..2cc6996 100755 --- a/global/post-tasks.d/099autoremove +++ b/global/post-tasks.d/099autoremove @@ -1,6 +1,4 @@ #!/bin/sh -if (( $RANDOM % 20 == 0)); then - apt-get -qq update - apt-get -qq -y autoremove -fi +apt-get -qq update +apt-get -qq -y autoremove diff --git a/global/pre-tasks.d/020common-tools b/global/pre-tasks.d/020common-tools index eaca6ea..563fab2 100755 --- a/global/pre-tasks.d/020common-tools +++ b/global/pre-tasks.d/020common-tools @@ -5,10 +5,10 @@ set -e -stamp="$COSMOS_BASE/stamps/common-tools-v01.stamp" +stamp="$COSMOS_BASE/stamps/common-tools-v02.stamp" if ! test -f $stamp; then - apt-get -y install vim traceroute tcpdump molly-guard less rsync git-core unattended-upgrades ntp + apt-get -y update && apt-get -y upgrade && apt-get -y install vim traceroute tcpdump molly-guard less rsync git-core unattended-upgrades ntp wget update-alternatives --set editor /usr/bin/vim.basic mkdir -p `dirname $stamp` diff --git a/global/pre-tasks.d/040hiera-gpg b/global/pre-tasks.d/040hiera-gpg index e5de6da..0ef2d86 100755 --- a/global/pre-tasks.d/040hiera-gpg +++ b/global/pre-tasks.d/040hiera-gpg @@ -14,8 +14,12 @@ if [ ! -f /usr/lib/ruby/vendor_ruby/gpgme.rb ]; then apt-get -y install ruby-gpgme fi +# this is useful to make the cmdline hiera tool work +if [ -f /etc/hiera/data/secrets.yaml.asc -a ! -f /etc/hiera/data/secrets.yaml.gpg ]; then + (cd /etc/hiera/data && ln -s secrets.yaml.asc secrets.yaml.gpg) +fi -if [ ! -s $GNUPGHOME/secring.gpg ]; then +if [ ! -s $GNUPGHOME/secring.gpg -a ! -s /etc/hiera/gpg/pubring.kbx ]; then if [ "x$1" != "x--force" ]; then echo "" @@ -44,6 +48,7 @@ Name-Comment: Hiera GPG key Name-Email: root@`hostname --fqdn` Expire-Date: 0 # Do a commit here, so that we can later print "done" :-) +%no-protection %commit %echo done EOF |