summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2012-10-26 13:14:37 +0200
committervarac <varacanero@zeromail.org>2012-10-26 13:14:37 +0200
commit8128fd27d9d3637654ebf924c860a701a4a08911 (patch)
treea88b8105be23e3883be3f38c655b95b6ccb7a012
parent6146c50f4ae9ef7b0887ee4abff66b5b62a6da9d (diff)
beginning config of main interface
-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',