Issue #21833 has been updated by Luitzen van Gorkum.

It isn't that big magic. We have some providing modules which must be included 
in other modules. When we decide a specific module to be present on a server, 
the providing modules must be present to. We don't want to administrate that 
seperately, we think it must me administered within the module. It is possible 
two different modules need the same providing module (such as apache::ssl). 
Because we can't include the same module twice we have to check on that. That's 
where tagged() comes in.

In my initial request it is just a little more than only includes, a providing 
module has different actions when other modules are included. We have a module 
providing a file whith owner root:root. When apache is loaded this must be 
changed to root:apache. When apache isn't loaded the apache group doesn't 
exists. That's why I tried to use tagged()

The defined() function is documented to be compilation order dependent, 
tagged() wasn't....

----------------------------------------
Bug #21833: tagged() does not work on conditionally includes
https://projects.puppetlabs.com/issues/21833#change-95298

* Author: Luitzen van Gorkum
* Status: Unreviewed
* Priority: Normal
* Assignee: 
* Category: functions
* Target version: 
* Affected Puppet version: 2.7.22
* Keywords: tagged
* Branch: 
----------------------------------------
When a module conditionally includes a class (to avoid multiple includes from 
different modules) like this:

  if ! tagged('apache::ssl') { include apache::ssl }

Then the tagged function in another module doesn't report the class as tagged:

  if tagged('apache::ssl') {
    do something
  } else {
    do something else
  }




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to