summaryrefslogtreecommitdiff
path: root/puppet/manifests/site.pp
blob: f0319bc22c5e51dd2a633f265cce515192e4f6a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# set a default exec path
Exec { path => '/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin' }

$custom_key_dir = 'puppet:///modules/site_apt/keys'

# parse services for host
$services=join(hiera_array('services'), ' ')
notice("Services for ${fqdn}: ${services}")

# make sure apt is updated before any packages are installed
include apt::update
Package { require => Exec['apt_updated'] }

include stdlib

import 'common'
include site_config::default
include site_config::slow


# configure eip
if $services =~ /\bopenvpn\b/ {
  include site_openvpn
}

if $services =~ /\bcouchdb\b/ {
  include site_couchdb
}

if $services =~ /\bwebapp\b/ {
  include site_webapp
  include site_nickserver
}

if $services =~ /\bmonitor\b/ {
  include site_nagios
}

if $services =~ /\btor\b/ {
  include site_tor
}