corl 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,51 +0,0 @@
1
- #!/bin/bash
2
- #-------------------------------------------------------------------------------
3
-
4
- PUPPET_PACKAGE="3.6.2-1puppetlabs1"
5
-
6
- #---
7
-
8
- # Set up Puppet Apt repositories
9
- echo "1. Fetching Puppet keys"
10
- apt-key adv --recv-key --keyserver pgp.mit.edu 4BD6EC30 >/tmp/puppet.key.log 2>&1 || exit 60
11
-
12
- echo "2. Updating Puppet packages from source"
13
- echo -e "# corl_puppet\ndeb http://apt.puppetlabs.com $OS_NAME main dependencies\ndeb-src http://apt.puppetlabs.com $OS_NAME main dependencies" | cat > /etc/apt/sources.list.d/corl_puppet.list || exit 61
14
- chmod 0644 /etc/apt/sources.list.d/corl_puppet.list || exit 62
15
-
16
- apt-get -y update >/tmp/puppet.update.log 2>&1 || exit 63
17
-
18
- # Install Puppet
19
- echo "3. Ensuring Puppet"
20
- apt-get -y install hiera puppet-common="$PUPPET_PACKAGE" puppet="$PUPPET_PACKAGE" >/tmp/puppet.install.log 2>&1 || exit 64
21
-
22
- chown -R root:puppet /var/lib/puppet || exit 65
23
-
24
- # Set up Hiera configuration
25
- mkdir -p /var/corl/config || exit 66
26
-
27
- if [ ! -e /etc/hiera.yaml ]
28
- then
29
- echo "4. Configuring Hiera"
30
-
31
- ( cat <<'EOP'
32
- ---
33
- :merge_behavior: deeper
34
- :backends:
35
- - yaml
36
- - json
37
- :yaml:
38
- :datadir: /var/corl/config
39
- :json:
40
- :datadir: /var/corl/config
41
- :hierarchy:
42
- - common
43
- EOP
44
- ) > /etc/hiera.yaml || exit 67
45
- chmod 0440 /etc/hiera.yaml || exit 68
46
- fi
47
-
48
- if [ ! -e /etc/puppet/hiera.yaml ]
49
- then
50
- ln -fs /etc/hiera.yaml /etc/puppet/hiera.yaml || exit 69
51
- fi