could not find class - puppet 2.7

K

kabu

Guest
Hello,

I'm using puppet-2.7.10-1 on CentOs 6.3, working on new module and I'm following this structure:

opendkim/
├── files
│ └── etc
│ └── opendkim
│ └── keys
├── manifests
│ ├── config.pp
│ ├── init.pp
│ ├── install.pp
│ ├── params.pp
│ └── service.pp
└── templates
└── etc
├── init.d
│ └── opendkim.erb
└── opendkim
├── KeyTable.erb
├── opendkim.conf.erb
├── SigningTable.erb

Code:
opendkim/manifests/init.pp

 # Class: opendkim
 #
 # This class installs opendkim
 #
 # Actions:
 #   Installs opendkim
 class opendkim {

    include opendkim::install
    include opendkim::params
    include opendkim::config
    include opendkim::service
}

Code:
manifests/nodes.pp

node 'hostname' { include opendkim }

and when I run puppet agent --test I get this:

Code:
$ sudo puppet agent --test
err: Could not retrieve catalog from remote server:
Error 400 on SERVER: Could not find class opendkim for hostname at
/etc/puppet/manifests/nodes.pp:13 on node hostname warning:
Not using cache on failed catalog err: Could not
retrieve catalog; skipping run


Another odd thing is that in order to make it work I have to specify class in /etc/puppet/manifests/site.pp file where is completely different from the following approach:

<module-name>
├── manifests
│ ├── config.pp
│ ├── init.pp
│ ├── install.pp
│ ├── params.pp
│ └── service.pp

Is there a place where you can define where to put classes or puppet should be smart enough to recognize statement "class <class-name>" in every .pp file ?
I was hoping that someone could shed some light on my issue or point me somewhere.
Thanks
 

Staff online

Members online


Latest posts

Top