06 Oct 2011

More Adventures in Puppet

   Thursday, 2010-08-12. More adventures in Puppet: Fix this: err: /Stage[main]/Sudo/File[/etc/sudoers]: Could not evaluate: Could not retrieve information from source(s) puppet:///modules/sudo/files/etc/sudoers at /etc/puppet/modules/sudo/manifests/init.pp:11

By changing your file request (genuinely located at /etc/puppet/modules/sudo/files/etc/sudoers) from:

class sudo {
        package { sudo:
        ensure => present,
        }
        file { "/etc/sudoers":
                owner => "root",
                group => "root",
                mode => 0440,
                source => "puppet:///modules/sudo/files/etc/sudoers",
                require => Package["sudo"],
                }
}
To this:

``` bash
class sudo {
        package { sudo:
        ensure => present,
        }
        file { "/etc/sudoers":
                owner => "root",
                group => "root",
                mode => 0440,
                source => "puppet:///modules/sudo/etc/sudoers",
                require => Package["sudo"],
                }
}

This is using Puppet 2.6.2

05 Oct 2011

Uggh - "Puppet hostname doesnt match server certificate"

Wow, this one stumped me for the better part of 12 hrs… So Puppet (the Ruby Gem) uses SSL certificates to authenticate to the Puppet Master.  I kept receiving the warning listed in the title of this post no matter how I altered my configs. Here’s the short version: Determine what Fully Qualified Domain Name is being used by the PuppetMaster to created the signing cert.  On my virtual platform this ended up being the hostname Add that hostname/FQDN and it’s IP address to your PuppetClient’s /etc/hosts like so: 173.999.999.999    hostname Now start up the PuppetMaster Server with the following command # puppetmasterd --verbose --no-daemonize Now invoke the puppet client like so: puppet agent --no-daemonize --verbose --server=HostnameOfServer Finally, now that we know it’s working well edit the /etc/puppet/puppet.conf on Puppet Client so that you have a server entry in the [main] section: [main] server=HostnameOfServer Tada!   Source of partial answer: Puppet hostname doesnt match server certificate - Server Fault.