All-
I'm using puppet 2.7.14. I've reviewed
http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html
but it doesn't seem to cover what I'm attempting.
Consider a module layout like this:
$ tree mymodule
mymodule
|-- Modulefile
|-- README
|-- manifests
| |-- init.pp
| |-- special_type
| | `-- prereqs.pp
| `-- special_type.pp
|-- spec
| `-- spec_helper.rb
`-- tests
`-- init.pp
4 directories, 7 files
$ egrep -v '^#|^$' mymodule/manifests/init.pp
class mymodule($type = hiera('mymodule_type', 'client')) {
case $type {
'client' : { }
'custom' : { }
'special_type' : { include mymodule::special_type }
default : { fail("Unknown mymodule_type=${mymodule_type}\n") }
}
}
The problem is the "include mymodule::special_type". I've tried both
having
mymodule/manifests/special_type/init.pp
as well as just
mymodule/manifests/special_type.pp
In both cases, doing this in a node definition:
class { 'mymodule':
type => 'special_type',
}
results in
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could
not find class mymodule::special_type for host.ndsu.edu at
/etc/puppet/modules/mymodule/manifests/init.pp:41 on node host.ndsu.edu
Is it even possible to do what I'm attempting? I know that
http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html
discusses nested "implementation" modules, but there's only examples of
loading specific implementations, e.g.
include my_module::implementation::foo
rather than
include my_module::implementation
I know from plenty of first-hand experience that another reason why I
might see a "could not find class <whatever>" is if I have a typo in the
class name within the .pp file, but I've reviewed the classes involved
here and don't see any problems.
Any thoughts on whether it's possible to load the "top level" of a nested
class?
Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing & Infrastructure 701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to puppet-users@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.