I'm attempting to follow along with the puppet pro book. And I'm trying to create my first module without much success.
[root@puppet:/etc/puppet] #puppet agent --test
Info: Retrieving plugin
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
This is where I'm setting my modules directory to be stored in the puppet.conf file:
## Where puppet keeps it's modules
modulepath = $confdir/modules
This is my modules dir
root@puppet:/etc/puppet] #ls -ld /etc/puppet/modules
drwxr-xr-x 5 puppet puppet 4096 Jan 7 01:33 /etc/puppet/modules
And the contents thereof:
[root@puppet:/etc/puppet] #ls -l /etc/puppet/modules
total 8
drwxr-xr-x 3 puppet puppet 4096 Jan 7 01:33 mysql
drwxr-xr-x 6 puppet puppet 4096 Jan 7 01:54 sudo
Contents of sudo
[root@puppet:/etc/puppet] #ls -l modules/sudo/
total 16
drwxr-xr-x 4 puppet puppet 4096 Jan 7 01:33 files
-rw-r--r-- 1 puppet puppet 399 Jan 7 01:54 init.pp
drwxr-xr-x 3 puppet puppet 4096 Jan 7 01:33 manifests
drwxr-xr-x 3 puppet puppet 4096 Jan 7 01:33 templates
And this is what /etc/puppet/modules/sudo/init.pp looks like:
[root@puppet:/etc/puppet] #cat modules/sudo/init.pp
class sudo {
package { sudo:
ensure => present,
}
if $operatingsystem == "Ubuntu" {
package { "sudo-ldap":
ensure => present,
require => Package["sudo"],
}
}
file { "/etc/sudoers":
owner => "root",
group => "root",
mode => 0440,
source => "puppet:///modules/sudo/etc/sudoers",
require => Package["sudo"],
}
}
I'm on puppet 3.4.1 and CentOS release 6.5
Can anyone please help me out as to why my puppet server isn't finding this module?
Thanks
Tim
--
GPG me!!
gpg --keyserver
pool.sks-keyservers.net --recv-keys F186197B