Merge pull request #8 from fredrikt/master

merge from eduid
This commit is contained in:
Leif Johansson 2015-02-23 20:01:18 +01:00
commit 4567098da8
4 changed files with 66 additions and 18 deletions

View file

@ -1,4 +1,4 @@
SHELL=/bin/sh SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
*/15 * * * * root test -f /etc/no-automatic-cosmos || (cosmos update ; cosmos apply) */15 * * * * root test -f /etc/no-automatic-cosmos || /usr/local/bin/run-cosmos

View file

@ -1,13 +1,36 @@
# #
# name source (puppetlabs fq name or git url) upgrade (yes/no) # name source (puppetlabs fq name or git url) upgrade (yes/no) tag-pattern
# #
concat puppetlabs/concat no # NOTE that Git packages MUST be tagged with signatures by someone
stdlib puppetlabs/stdlib no # in the Cosmos trust list. That is why all the URLs point to forked
cosmos git://github.com/leifj/puppet-cosmos.git yes # versions in the SUNET github organization.
ufw attachmentgenie/ufw no #
apt puppetlabs/apt no concat git://github.com/SUNET/puppetlabs-concat.git yes sunet-*
vcsrepo puppetlabs/vcsrepo no stdlib git://github.com/SUNET/puppetlabs-stdlib.git yes sunet-*
xinetd puppetlabs/xinetd no cosmos git://github.com/SUNET/puppet-cosmos.git yes sunet-*
#golang elithrar/golang yes ufw git://github.com/SUNET/puppet-module-ufw.git yes sunet_dev-*
#python git://github.com/stankevich/puppet-python.git yes apt git://github.com/SUNET/puppetlabs-apt.git yes sunet_dev-*
hiera-gpg git://github.com/SUNET/hiera-gpg.git no vcsrepo git://github.com/SUNET/puppetlabs-vcsrepo.git yes sunet-*
xinetd git://github.com/SUNET/puppetlabs-xinetd.git yes sunet-*
hiera-gpg git://github.com/SUNET/hiera-gpg.git yes sunet-*
#
# Alternate sources you might or might not want to use:
#concat puppetlabs/concat no
#stdlib puppetlabs/stdlib no
#ufw attachmentgenie/ufw no
#apt puppetlabs/apt no
#vcsrepo puppetlabs/vcsrepo no
#xinetd puppetlabs/xinetd no
#cosmos git://github.com/leifj/puppet-cosmos.git yes
#python git://github.com/SUNET/puppet-python.git yes sunet-*
#erlang git://github.com/SUNET/garethr-erlang.git yes sunet-*
#rabbitmq git://github.com/SUNET/puppetlabs-rabbitmq.git yes sunet_dev-*
#pound git://github.com/SUNET/puppet-pound.git yes sunet_dev-*
#augeas git://github.com/SUNET/puppet-augeas.git yes sunet-*
#bastion git://github.com/SUNET/puppet-bastion.git yes sunet-*
#postgresql git://github.com/SUNET/puppetlabs-postgresql.git yes sunet_dev-*
#munin git://github.com/SUNET/ssm-munin.git yes sunet-*
#nagios git://github.com/SUNET/puppet-nagios.git yes sunet-*
#staging git://github.com/SUNET/puppet-staging.git yes sunet-*
#apparmor git://github.com/SUNET/puppet-apparmor.git yes sunet-*
#docker git://github.com/SUNET/garethr-docker.git yes sunet_dev-*

View file

@ -1,13 +1,16 @@
--- ---
:backends: - yaml :backends:
- gpg - yaml
- gpg
:logger: console :logger: console
:hierarchy: - %{env}/%{location}/%{calling_module} :hierarchy:
- %{env}/%{calling_module} - "%{env}/%{location}/%{calling_module}"
- secrets.yaml - "%{env}/%{calling_module}"
- common - local
- secrets.yaml
- common
:yaml: :yaml:

View file

@ -0,0 +1,22 @@
#!/bin/sh
#
# Simplify running cosmos, with serialization if flock is available.
#
set -e
FLOCK=`which flock`
if [ -x "$FLOCK" ]; then
($FLOCK --exclusive --wait 60 9 || exit 1
cosmos $* update
cosmos $* apply
)9>/var/lock/run-cosmos
else
cosmos $* update
cosmos $* apply
fi
touch /var/run/last-cosmos-ok.stamp
find /var/lib/puppet/reports/ -type f -mtime +10 | xargs rm -f