Restart ssh when config file changes
[mirror/dsa-puppet.git] / modules / ssh / manifests / init.pp
index 75fb475..d981047 100644 (file)
@@ -10,7 +10,13 @@ class ssh {
                 ;
               "/etc/ssh/sshd_config":
                content => template("ssh/sshd_config.erb"),
-               require => Package["openssh-server"]
+               require => Package["openssh-server"],
+                notify  => Exec["ssh restart"]
                 ;
        }
+
+        exec { "ssh restart":
+            path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
+            refreshonly => true,
+        }
 }