summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/eip/cougar.leap.se.yaml12
-rw-r--r--config/eip/defaults.yml5
-rw-r--r--config/hosts/cougar.leap.se.yaml1
-rw-r--r--puppet/manifests/site.pp21
4 files changed, 22 insertions, 17 deletions
diff --git a/config/eip/cougar.leap.se.yaml b/config/eip/cougar.leap.se.yaml
index 39926616..d98787d0 100644
--- a/config/eip/cougar.leap.se.yaml
+++ b/config/eip/cougar.leap.se.yaml
@@ -1,5 +1,9 @@
---
-openvpn_ports: - 80
- - 443
- - 1194
-tor: 'true'
+openvpn:
+ port80_tcp:
+ port: 80
+ protocol: tcp
+ port1194_udp:
+ port: 1194
+ protocol: udp
+tor: 'false'
diff --git a/config/eip/defaults.yml b/config/eip/defaults.yml
index 7be713b5..fab63a5c 100644
--- a/config/eip/defaults.yml
+++ b/config/eip/defaults.yml
@@ -1,7 +1,4 @@
---
-
# make shure 'false' is quoted
tor: 'false'
-openvpn_ports: - 80
- - 443
- - 1194
+openvpn:
diff --git a/config/hosts/cougar.leap.se.yaml b/config/hosts/cougar.leap.se.yaml
index 312d0141..5cf37bb1 100644
--- a/config/hosts/cougar.leap.se.yaml
+++ b/config/hosts/cougar.leap.se.yaml
@@ -1,4 +1,3 @@
---
-# varac's local machine
services: - eip
- couchdb
diff --git a/puppet/manifests/site.pp b/puppet/manifests/site.pp
index bb29e393..abb81511 100644
--- a/puppet/manifests/site.pp
+++ b/puppet/manifests/site.pp
@@ -1,7 +1,15 @@
define print() {
- notice("The value is: '${name}'")
+ 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')
@@ -11,12 +19,9 @@ node 'default' {
notice("Services for $fqdn: $services")
if 'eip' in $services {
- $openvpn_ports=hiera_array('openvpn_ports')
+ $openvpn=hiera('openvpn')
$tor=hiera('tor')
- notice("Openvpn Config for $fqdn: openvpn_ports=$openvpn_ports, tor=$tor")
- print{$openvpn_ports:}
- #include site_openvpn
+ notice("Tor enabled: $tor")
+ create_resources('create_openvpn_config', $openvpn)
}
-
-
}