summaryrefslogtreecommitdiff
path: root/puppet/modules
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules')
-rw-r--r--puppet/modules/site_config/manifests/eip.pp22
1 files changed, 19 insertions, 3 deletions
diff --git a/puppet/modules/site_config/manifests/eip.pp b/puppet/modules/site_config/manifests/eip.pp
index df17771a..0077137b 100644
--- a/puppet/modules/site_config/manifests/eip.pp
+++ b/puppet/modules/site_config/manifests/eip.pp
@@ -5,9 +5,25 @@ class site_config::eip {
#$tor=hiera('tor')
#notice("Tor enabled: $tor")
- $openvpn_config = hiera('openvpn')
- $interface = hiera('interface')
- $gateway_address = $openvpn_config['gateway_address']
+ $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",
+ "up ip addr add $openvpn_gateway_address/24 dev eth0 label",
+ "down ip addr del $openvpn_gateway_address/24 dev eth0 label",
+ ],
+ auto => 1,
+ allow_hotplug => 1 }
+
site_openvpn::server_config { 'tcp_config':
port => '1194',