summaryrefslogtreecommitdiff
path: root/puppet/manifests/site.pp
blob: abb81511628f8c170c4d4ab747ee50909275ad3f (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
define print() {
  notice("The value is: '${name}'")
}

define create_openvpn_config($port, $protocol) {
  $openvpn_configname=$name
  notice("Creating OpenVPN $openvpn_configname:  
    Port: $port, Protocol: $protocol")
  # ...
  #include site_openvpn

}

node 'default' {
  #$password=hiera('testpw')
  #notify {"Password: $password":}

  $services=hiera_array('services')
  notice("Services for $fqdn: $services")

  if 'eip' in $services {
    $openvpn=hiera('openvpn')
    $tor=hiera('tor')
    notice("Tor enabled: $tor")
    create_resources('create_openvpn_config', $openvpn)
  }
}