Hey all,

 I'm attempting to follow along with the puppet pro book. And I'm trying to
create my first module without much success.

This is the error that I'm getting when I do a puppet run:

[root@puppet:/etc/puppet] #puppet agent --test
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not find class sudo for puppet.jokefire.com on node
puppet.jokefire.com
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

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAOZy0emU2Sx-MLxjn%3D_qRQyF4GURgUucKvzUrVi%3DCARs62hBtw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to