summaryrefslogtreecommitdiff
path: root/puppet/modules/site_config/manifests
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2012-10-29 20:04:23 +0100
committervarac <varacanero@zeromail.org>2012-10-29 20:04:23 +0100
commit372797b1f0b2a65698e8f4cd52fdf5d93a274965 (patch)
tree8c2f1acfeb35c4ece9de4ce6d7d23e26dc5edc6f /puppet/modules/site_config/manifests
parent7f82917633ad444e1a303df5bd02ebe29aa05921 (diff)
reenabled site_openvpn::server_config, leap_add_second_ip.sh @reboot
Diffstat (limited to 'puppet/modules/site_config/manifests')
-rw-r--r--puppet/modules/site_config/manifests/eip.pp57
1 files changed, 21 insertions, 36 deletions
diff --git a/puppet/modules/site_config/manifests/eip.pp b/puppet/modules/site_config/manifests/eip.pp
index 59889a92..498d7eed 100644
--- a/puppet/modules/site_config/manifests/eip.pp
+++ b/puppet/modules/site_config/manifests/eip.pp
@@ -2,44 +2,28 @@ class site_config::eip {
include site_openvpn
include site_openvpn::keys
- #$tor=hiera('tor')
- #notice("Tor enabled: $tor")
-
$ip_address = hiera('ip_address')
$interface = hiera('interface')
$gateway_address = hiera('gateway_address')
$openvpn_config = hiera('openvpn')
$openvpn_gateway_address = $openvpn_config['gateway_address']
- #include interfaces
- #interfaces::iface { $interface:
- # family => 'inet',
- # method => 'static',
- # options => [ "address $ip_address",
- # 'netmask 255.255.255.0',
- # "gateway $gateway_address",
- # "up ip addr add $openvpn_gateway_address/24 dev $interface",
- # "down ip addr del $openvpn_gateway_address/24 dev $interface",
- # ],
- # auto => 1,
- # allow_hotplug => 1 }
-
- #site_openvpn::server_config { 'tcp_config':
- # port => '1194',
- # proto => 'tcp',
- # local => $gateway_address,
- # server => '10.1.0.0 255.255.248.0',
- # push => '"dhcp-option DNS 10.1.0.1"',
- # management => '127.0.0.1 1000'
- #}
- #site_openvpn::server_config { 'udp_config':
- # port => '1194',
- # proto => 'udp',
- # local => $gateway_address,
- # server => '10.2.0.0 255.255.248.0',
- # push => '"dhcp-option DNS 10.2.0.1"',
- # management => '127.0.0.1 1001'
- #}
+ site_openvpn::server_config { 'tcp_config':
+ port => '1194',
+ proto => 'tcp',
+ local => $openvpn_gateway_address,
+ server => '10.1.0.0 255.255.248.0',
+ push => '"dhcp-option DNS 10.1.0.1"',
+ management => '127.0.0.1 1000'
+ }
+ site_openvpn::server_config { 'udp_config':
+ port => '1194',
+ proto => 'udp',
+ local => $openvpn_gateway_address,
+ server => '10.2.0.0 255.255.248.0',
+ push => '"dhcp-option DNS 10.2.0.1"',
+ management => '127.0.0.1 1001'
+ }
file { '/usr/local/bin/leap_add_second_ip.sh':
content => "#!/bin/sh
@@ -51,10 +35,11 @@ ip addr show dev $interface | grep -q ${openvpn_gateway_address}/24 || ip addr a
subscribe => File['/usr/local/bin/leap_add_second_ip.sh'],
}
- #exec { "ip addr add $openvpn_gateway_address/24 dev $interface":
- # path => '/usr/bin:/sbin',
- # unless => "ip addr show dev $interface | grep -q '$interface/24'"
- #}
+ cron { 'leap_add_second_ip.sh':
+ command => "/usr/local/bin/leap_add_second_ip.sh",
+ user => 'root',
+ special => 'reboot',
+ }
include site_shorewall::eip
}