I tried EVERY possible version to restart ssh(d) on Ubuntu, Service, 
Upstart, init.d.

I could not get any of them to acknowledge that there was an ssh daemon. 
But SSH works, and changes to /etc/ssh/ssh_config have effect.

Weird.

On Thursday, March 15, 2012 1:51:44 PM UTC-7, Gary Larizza wrote:
>
> Are you trying to start 'ssh' or 'sshd' as a service ( you 
> have $ssh_service_name = 'ssh' in your params class)?
>
>
> On Fri, Mar 16, 2012 at 12:23 AM, Luis Festas Matos <[email protected] 
> <javascript:>> wrote:
>
>> Hi all, I've been following the Puppet Pro book and trying to do a 
>> configuration of a ssh module like it's told in the book. I'm on Ubuntu 
>> 10.10.
>>
>> The files I have are the following:
>>
>> on /etc/puppet/modules/ssh/manifests I have the config.pp  init.pp 
>>  install.pp  params.pp  service.pp files
>>
>> they're quite small so I'm including them in the end of the post.
>>
>> The problem that is happening is that if I stop the ssh service manually 
>> (i.e. with service ssh stop), I would like to see puppet starting the 
>> service again.
>> What I do is: stop the service, run the puppet client and wait. Nothing 
>> happens. I see puppet doing other things but it doesn't do anything with 
>> the ssh service.
>> Here's the relevant part of the client log. It runs with no errors.
>> debug: /Stage[main]/Ssh::Service/Service[ssh]/require: requires 
>> Class[Ssh::Config]
>> debug: /Stage[main]/Ssh::Config/File[/etc/ssh/sshd_config]/require: 
>> requires Class[Ssh::Install]
>> debug: /Stage[main]/Ssh::Config/File[/etc/ssh/sshd_config]/notify: 
>> subscribes to Class[Ssh::Service]
>>
>> So I see that it recognizes my module, but it won't start the ssh service 
>> when I turn it down. Any help would be appreciated.
>>
>>
>>
>>
>>
>> file init.pp
>>
>> class ssh {
>> include ssh::params, ssh::install, ssh::config, ssh::service
>> }
>>
>> file params.pp
>> class ssh::params {
>>   case $operatingsystem {
>>      ...
>>     /(Ubuntu|Debian)/: {
>>       $ssh_package_name = 'openssh-server'
>>       $ssh_service_config = '/etc/ssh/sshd_config'
>>       $ssh_service_name = 'ssh'
>>     }
>>   }
>> }
>>
>> file install.pp
>> class ssh::install {
>>   package { $ssh::params::ssh_package_name:
>>      ensure => present,
>>   }
>> }
>>
>> file config.pp
>>
>> class ssh::config {
>>   file { $ssh::params::ssh_service_config:
>>     ensure => present,
>>     owner => 'root',
>>     group => 'root',
>>     mode  => 0644,
>>     source => "puppet:///modules/ssh/sshd_config",
>>     require => Class["ssh::install"],
>>     notify => Class["ssh::service"],
>>   }
>> }
>>
>> file service.pp
>>
>> class ssh::service {
>>   service { $ssh::params::ssh_service_name:
>>     ensure => running,
>>     hasstatus => true,
>>     hasrestart => true,
>>     enable => true,
>>     require => Class["ssh::config"]
>>   }
>> }
>>  
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/puppet-users/-/Ruv4rv8TAgQJ.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To unsubscribe from this group, send email to 
>> [email protected] <javascript:>.
>> For more options, visit this group at 
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>
>
> -- 
>
> Gary Larizza
> Professional Services Engineer
> Puppet Labs
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b00fb8e4-eebe-4f88-ac97-b624825f7b1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to