From 160b78150b3f5a2d16c9e67bf5c5a991598bd6c2 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sun, 2 Aug 2009 01:18:08 +0100 Subject: [PATCH] Restart ssh when config file changes Signed-off-by: Stephen Gran --- modules/ssh/manifests/init.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/ssh/manifests/init.pp b/modules/ssh/manifests/init.pp index 75fb47597..d981047d6 100644 --- a/modules/ssh/manifests/init.pp +++ b/modules/ssh/manifests/init.pp @@ -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, + } } -- 2.20.1