From c0b642e0e81b3c12c52a5f4b2d8f5ae4317e8c36 Mon Sep 17 00:00:00 2001 From: Justin Lambert Date: Wed, 9 Jan 2013 16:52:17 -0700 Subject: more cleanup, spec tests pass --- manifests/client.pp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'manifests/client.pp') diff --git a/manifests/client.pp b/manifests/client.pp index 71b720d..6abef5e 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -2,6 +2,7 @@ define openvpn::client( $server, + $compression = 'comp-lzo', $dev = 'tun', $mute = '20', $mute_replay_warnings = true, @@ -12,7 +13,7 @@ define openvpn::client( $port = '1194', $proto = 'tcp', $remote_host = $::fqdn, - $resolve_retry = 'infinite', + $resolv_retry = 'infinite', $verb = '3', ) { exec { @@ -50,10 +51,17 @@ define openvpn::client( target => "/etc/openvpn/${server}/easy-rsa/keys/ca.crt", require => [ Exec["generate certificate for ${name} in context of ${server}"], File["/etc/openvpn/${server}/download-configs/${name}/keys"] ]; + + "/etc/openvpn/${server}/download-configs/${name}/${name}.conf": + owner => root, + group => root, + mode => '0444', + content => template('openvpn/client.erb'), + notify => Exec["tar the thing ${server} with ${name}"]; } concat { - [ "/etc/openvpn/${server}/client-configs/${name}", "/etc/openvpn/${server}/download-configs/${name}/${name}.conf" ]: + "/etc/openvpn/${server}/client-configs/${name}": owner => root, group => root, mode => 644, @@ -63,12 +71,6 @@ define openvpn::client( require => [ File['/etc/openvpn'], File["/etc/openvpn/${server}/download-configs/${name}"] ]; } - concat::fragment { - "openvpn.${server}.client.${name}": - target => "/etc/openvpn/${server}/download-configs/${name}/${name}.conf", - content => "${content}\n"; - } - exec { "tar the thing ${server} with ${name}": cwd => "/etc/openvpn/${server}/download-configs/", -- cgit v1.2.3