I am hoping someone can give me a pointer in the right direction here. I am a bit stuck with this one. I have this sort of set up in my Puppet 2.6.4 server.
class foo{ #if defined( Class[“ type-server-b”] ) { # include tuning-module #} include apache include mysql # more modules } node 'server1.fqdn' inherits type-server-a { include foo } node 'server2.fqdn' inherits type-server-b { include foo } What I would like to be able to do would be to do is to see if either “type-server-a” or “type-server-b” was inherited from my nodes definition. I experimented with the “defined” function, but this isn't really designed for that I am trying to do here. Is there a way of being able to check if a module has been included in the catalogue evaluation that puppet is currently running? The only other way I could think of was to create a variable in “type- server-a” and “type-server-b” and to check its value in class foo, this just didn’t seem like an overly elegant way of doing it. Is there a better way of doing this, assuming its possible at all? -- 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.