Re: [Puppet Users] Restart ssh daemon when sshdconfig is modified

2014-08-16 Thread Vikas Kumar
Many thanks Jeffrey, working like a charm. On Friday, 15 August 2014 22:52:22 UTC+10, Jeffrey Watts wrote: On Fri, Aug 15, 2014 at 7:31 AM, Vikas Kumar vika...@gmail.com javascript: wrote: Dear All, I am trying to restart SSH daemon whenever /etc/ssh/sshd_config is modified. This is my

Re: [Puppet Users] Restart ssh daemon when sshdconfig is modified

2014-08-16 Thread Vikas Kumar
Hi Christopher, Thanks for the links and suggestion. I am not well versed with ERB as of now, just wanted to make things work (and understand them of course), will surely work on improving my code soon. Regards, Vikas On Friday, 15 August 2014 23:54:28 UTC+10, Christopher Wood wrote: Could

[Puppet Users] Restart ssh daemon when sshdconfig is modified

2014-08-15 Thread Vikas Kumar
Dear All, I am trying to restart SSH daemon whenever /etc/ssh/sshd_config is modified. This is my class, it modifies the file but does not restarts the daemon. I have tried to use both *notify* and *subscribe* in vain. class ssh ( $ssh_service = hiera(sshservicename) ) { package {

Re: [Puppet Users] Restart ssh daemon when sshdconfig is modified

2014-08-15 Thread Jeffrey Watts
On Fri, Aug 15, 2014 at 7:31 AM, Vikas Kumar vikas...@gmail.com wrote: Dear All, I am trying to restart SSH daemon whenever /etc/ssh/sshd_config is modified. This is my class, it modifies the file but does not restarts the daemon. I have tried to use both *notify* and *subscribe* in vain.

Re: [Puppet Users] Restart ssh daemon when sshdconfig is modified

2014-08-15 Thread Christopher Wood
Could also go for: File[/etc/ssh/sshd_config] - Augeas[my-ssh] File[/etc/ssh/sshd_config] ~ Service[$ssh_service] Augeas[my-ssh] ~ Service[$ssh_service] A bit wordier but it covers what happens when the file is changed but augeas has nothing to change. Vikas, perhaps you might use a template