summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2012-10-29 14:58:55 +0100
committervarac <varacanero@zeromail.org>2012-10-29 14:58:55 +0100
commit189e8957c23fb09ef8c130f64e53f58c9da7d3ec (patch)
tree80e7fccaf02ac8d370575bce324da37d725b9939 /puppet
parentc40a1bce442aab4ba8baf062ffcb65e006ad13e0 (diff)
pass variable to leap_add_second_ip.sh
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/site_config/manifests/eip.pp29
1 files changed, 14 insertions, 15 deletions
diff --git a/puppet/modules/site_config/manifests/eip.pp b/puppet/modules/site_config/manifests/eip.pp
index c81ad33a..ed1d395b 100644
--- a/puppet/modules/site_config/manifests/eip.pp
+++ b/puppet/modules/site_config/manifests/eip.pp
@@ -11,19 +11,18 @@ class site_config::eip {
$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 }
-
+ #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',
@@ -43,8 +42,8 @@ class site_config::eip {
#}
file { '/usr/local/bin/leap_add_second_ip.sh':
- content => '#!/bin/sh
- ip addr show dev eth0 | grep -q "$openvpn_gateway_address/24" || ip addr add "$openvpn_gateway_address/24" dev eth0',
+ content => "#!/bin/sh
+ip addr show dev $interface | grep -q "$openvpn_gateway_address/24" || ip addr add "$openvpn_gateway_address/24" dev $interface",
mode => '0755',
}