On Tuesday, November 18, 2014 10:09:32 AM UTC-6, Craig White wrote: > > OK - but I still need to figure out how to call one class with parameters > from another class... > > class wl::config { : > class openldap::server::database { $dn: > ensure => present, > rootdn => "cn=admin,${dn}", > rootpw => $rootpw, > } > } > >
Oh, is THAT all? You are mixing the syntax for defining a class with that for declaring one. A resource-style class declaration looks like this: class { 'mymodule::myclass': param1 => value1, param2 => value2 } HOWEVER, your specific example also seems to imply that you think openldap::server::database is a class, whereas it's actually a resource type (specifically, a defined type). You would declare instances of that type just like you declare instances of any other resource type: openldap::server::database { $dn: ensure => present, rootdn => "cn=admin,${dn}", rootpw => $rootpw, } The docs of the openldap module provide additional examples of both. Do note, however, that an ENC cannot emit resource declarations, only class declarations and global variables. Moreover, be aware that for most purposes it is poor form to use resource-like class declarations. They do have their purposes, but it is usually better form to bind data to classes via Hiera than to bind it explicitly in the class declaration (whether via node block or via ENC). Use the 'include' family of functions to declare classes wherever it is feasible to do so. John -- 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/196e8eed-8a1c-432d-956e-8dc48d1f83c4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.