summaryrefslogtreecommitdiff
path: root/puppet/modules/site_openvpn
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2012-10-04 23:38:57 +0200
committervarac <varacanero@zeromail.org>2012-10-04 23:38:57 +0200
commit1ec1b9b56bc821b81f3797ea158846b41cc03853 (patch)
treeba7edf8c14ba56c8641c7ec4fe277f45babb1767 /puppet/modules/site_openvpn
parentb59ce36a29a770847368773db543b38c62ea55cf (diff)
finished site_openvpn::server_config
Diffstat (limited to 'puppet/modules/site_openvpn')
-rw-r--r--puppet/modules/site_openvpn/manifests/server_config.pp16
1 files changed, 11 insertions, 5 deletions
diff --git a/puppet/modules/site_openvpn/manifests/server_config.pp b/puppet/modules/site_openvpn/manifests/server_config.pp
index 320a4add..784152b7 100644
--- a/puppet/modules/site_openvpn/manifests/server_config.pp
+++ b/puppet/modules/site_openvpn/manifests/server_config.pp
@@ -1,6 +1,8 @@
-define site_openvpn::server_config($port, $proto) {
+define site_openvpn::server_config ($port, $proto, $local, $server, $push ) {
+
$openvpn_configname = $name
+
#notice("Creating OpenVPN $openvpn_configname:
# Port: $port, Protocol: $proto")
@@ -45,7 +47,7 @@ define site_openvpn::server_config($port, $proto) {
server => $openvpn_configname;
"local $openvpn_configname":
key => 'local',
- value => $::ipaddress,
+ value => $local,
server => $openvpn_configname;
"mute $openvpn_configname":
key => 'mute',
@@ -62,9 +64,13 @@ define site_openvpn::server_config($port, $proto) {
key => 'proto',
value => $proto,
server => $openvpn_configname;
- "push $openvpn_configname":
+ "push1 $openvpn_configname":
+ key => 'push',
+ value => $push,
+ server => $openvpn_configname;
+ "push2 $openvpn_configname":
key => 'push',
- value => "\"redirect-gateway def1\"",
+ value => '"redirect-gateway def1"',
server => $openvpn_configname;
"script-security $openvpn_configname":
key => 'script-security',
@@ -72,7 +78,7 @@ define site_openvpn::server_config($port, $proto) {
server => $openvpn_configname;
"server $openvpn_configname":
key => 'server',
- value => "10.42.0.0 255.255.248.0",
+ value => "$server",
server => $openvpn_configname;
"status $openvpn_configname":
key => 'status',