Hi,

I try to write an autoconfigure module (collectd) that depends on other modules included for my node.

So I've this class autoloaded for all my nodes :

class collectd::client::autoconfig {
  require collectd::client

  if tagged('apache') {
    require apache
    include collectd::client::plugin::apache
  }
  if tagged('memcached') {
    require memcached
    include collectd::client::plugin::memcached
  }
(...)
}

But sometimes, on my old nodes, collectd is manually configured (for an historical bad/good reason); so, for my old_node1 I have "include collectd::client::plugin::apache" but I don't have the "apache module" included; in this case my autoloader will detect the tag "apache" in my class "include collectd::client::plugin::*apache*" ...

It does not seem possible to use "::apache" in the tagged function ? Am I right ? Have you got any idea for my case ? (I can add a parameter to disable my autoconfig, but I'm looking for a better solution if it exists.)

Best regards,
Poil

--
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/547C24D5.9010708%40quake.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to