Hi folks,

I have a couple of classes to manage ssh servers. All my hosts include
ssh::server which manages a generic config file, and some of them
include ssh::server::forceip which use a template to force sshd to bind
on specific IP addresses. Here is the code:

class ssh::server {

        $servicename = $osvendor ? {
                "redhat" => "sshd",
                "debian" => "ssh",
        }

        package { "openssh-server": ensure => installed }

        service { $servicename:
                ensure => running,
                enable => true,
                require => Package["openssh-server"],
                subscribe => Package["openssh-server"],
        }

        file { "/etc/ssh/sshd_config":
                source => "puppet:///modules/ssh/sshd_config",
                owner => "root",
                group => "root",
                mode => 0400,
                notify => Service[$servicename],
        }

}

class ssh::server::forceip inherits ssh::server {

        File["/etc/ssh/sshd_config"] {
                content => template("ssh/sshd_config.erb"),
                source => undef,
        }

}

Everything works as intended with 0.25.x clients (with 0.25.x or 2.6.x
puppetmaster).

I have a test puppetmaster running 2.6.x (both client and server, I use
RPM packages from tmz-puppet repo:
puppet{,-server}-2.6.3-0.2.rc1.el5). This host includes the
ssh::server::forceip class. From time to time, the sshd_config file from
the ::forceip class gets overwritten by the generic one, then comes back
on the next run. I can't see anything changing between runs; the
ssh::server::forceip class is still in classes.txt.

What am I doing wrong?

-- 
Arnaud

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to