updated spacing for multi-line arrays. updated selector for consistency
authorJustin Lambert <jlambert@eml.cc>
Sat, 29 Dec 2012 14:20:49 +0000 (07:20 -0700)
committerJustin Lambert <jlambert@eml.cc>
Sat, 29 Dec 2012 14:20:49 +0000 (07:20 -0700)
manifests/client.pp
manifests/server.pp

index d45d29b..7927000 100644 (file)
@@ -22,19 +22,19 @@ define openvpn::client($server, $remote_host = $fqdn) {
         "/etc/openvpn/${server}/download-configs/${name}/keys/${name}.crt":
             ensure  => link,
             target  => "/etc/openvpn/${server}/easy-rsa/keys/${name}.crt",
-            require => [ Exec["generate certificate for ${name} in context of ${server}"],
+            require => [  Exec["generate certificate for ${name} in context of ${server}"],
                           File["/etc/openvpn/${server}/download-configs/${name}/keys"] ];
 
         "/etc/openvpn/${server}/download-configs/${name}/keys/${name}.key":
             ensure  => link,
             target  => "/etc/openvpn/${server}/easy-rsa/keys/${name}.key",
-            require => [ Exec["generate certificate for ${name} in context of ${server}"],
+            require => [  Exec["generate certificate for ${name} in context of ${server}"],
                           File["/etc/openvpn/${server}/download-configs/${name}/keys"] ];
 
         "/etc/openvpn/${server}/download-configs/${name}/keys/ca.crt":
             ensure  => link,
             target  => "/etc/openvpn/${server}/easy-rsa/keys/ca.crt",
-            require => [ Exec["generate certificate for ${name} in context of ${server}"],
+            require => [  Exec["generate certificate for ${name} in context of ${server}"],
                           File["/etc/openvpn/${server}/download-configs/${name}/keys"] ];
     }
 
@@ -121,10 +121,10 @@ define openvpn::client($server, $remote_host = $fqdn) {
             cwd         => "/etc/openvpn/${server}/download-configs/",
             command     => "/bin/rm ${name}.tar.gz; tar --exclude=\\*.conf.d -chzvf ${name}.tar.gz ${name}",
             refreshonly => true,
-            require     => [ File["/etc/openvpn/${server}/download-configs/${name}/${name}.conf"],
-                            File["/etc/openvpn/${server}/download-configs/${name}/keys/ca.crt"],
-                            File["/etc/openvpn/${server}/download-configs/${name}/keys/${name}.key"],
-                            File["/etc/openvpn/${server}/download-configs/${name}/keys/${name}.crt"] ];
+            require     => [  File["/etc/openvpn/${server}/download-configs/${name}/${name}.conf"],
+                              File["/etc/openvpn/${server}/download-configs/${name}/keys/ca.crt"],
+                              File["/etc/openvpn/${server}/download-configs/${name}/keys/${name}.key"],
+                              File["/etc/openvpn/${server}/download-configs/${name}/keys/${name}.crt"] ];
     }
 
 
index dbc8bb6..bfcaad8 100644 (file)
@@ -3,9 +3,9 @@
 define openvpn::server($country, $province, $city, $organization, $email) {
     include openvpn
 
-    $easyrsa_source = $operatingsystem ? {
-      'centos' => '/usr/share/doc/openvpn-2.2.2/easy-rsa/2.0',
-      default => '/usr/share/doc/openvpn/examples/easy-rsa/2.0'
+    $easyrsa_source = $::osfamily ? {
+      'RedHat'  => '/usr/share/doc/openvpn-2.2.2/easy-rsa/2.0',
+      default   => '/usr/share/doc/openvpn/examples/easy-rsa/2.0'
     }
 
     $link_openssl_cnf = $::osfamily ? {
@@ -34,9 +34,9 @@ define openvpn::server($country, $province, $city, $organization, $email) {
             server  => $name,
             require => File["/etc/openvpn/${name}"];
         "mode ${name}":
-            key    => 'mode',
-            value  => 'server',
-            server => $name;
+            key     => 'mode',
+            value   => 'server',
+            server  => $name;
     }
 
     exec {