summaryrefslogtreecommitdiff
path: root/puppet/modules/site_config
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2012-10-30 12:16:49 +0100
committervarac <varacanero@zeromail.org>2012-10-30 12:16:49 +0100
commit2f747b961a1fd5f7197e63dde58b64ab465ac39d (patch)
tree7246b6b445b48d4f7f6014c0b7e9500f58f7fd27 /puppet/modules/site_config
parent04d324a61cb33ff282e2dc3228e25723b564ea1f (diff)
commenting
Diffstat (limited to 'puppet/modules/site_config')
-rw-r--r--puppet/modules/site_config/manifests/eip.pp10
1 files changed, 8 insertions, 2 deletions
diff --git a/puppet/modules/site_config/manifests/eip.pp b/puppet/modules/site_config/manifests/eip.pp
index d7a59157..4280fb67 100644
--- a/puppet/modules/site_config/manifests/eip.pp
+++ b/puppet/modules/site_config/manifests/eip.pp
@@ -1,7 +1,6 @@
class site_config::eip {
- include site_openvpn
- include site_openvpn::keys
+ # parse hiera config
$ip_address = hiera('ip_address')
$interface = hiera('interface')
#$gateway_address = hiera('gateway_address')
@@ -14,6 +13,12 @@ class site_config::eip {
$openvpn_udp_netmask = '255.255.248.0'
$openvpn_udp_cidr = '21'
+ include site_openvpn
+
+ # deploy ca + server keys
+ include site_openvpn::keys
+
+ # create 2 openvpn config files, one for tcp, one for udp
site_openvpn::server_config { 'tcp_config':
port => '1194',
proto => 'tcp',
@@ -31,6 +36,7 @@ class site_config::eip {
management => '127.0.0.1 1001'
}
+ # add second IP on given interface
file { '/usr/local/bin/leap_add_second_ip.sh':
content => "#!/bin/sh
ip addr show dev $interface | grep -q ${openvpn_gateway_address}/24 || ip addr add ${openvpn_gateway_address}/24 dev $interface",