Issue #7759 has been reported by Jamie McClelland.
----------------------------------------
Bug #7759: when parsing, puppet should not output warning "You cannot collect
without storeconfigs being set"
https://projects.puppetlabs.com/issues/7759
Author: Jamie McClelland
Status: Unreviewed
Priority: Normal
Assignee:
Category:
Target version:
Affected Puppet version:
Keywords:
Branch:
puppet throws a warning if you include any files with code that exports or
collects resources if you are not running puppet with storeconfigs enabled.
This warning is important and reasonable.
However, the warning is output even if the code that does the exporting and
collecting is wrapped in a conditional statement that is not being executed.
This behavior is a problem because shared modules that have optional
functionality if storeconfigs is enabled output error messages when used by
sites that do not have storeconfigs enabled.
Here's an example:
0 roach:~# cat test-sc-off.pp
$using_store_configs = false
if ( $using_store_configs == true ) {
notice("storeconfigs in use")
@@file { "/tmp/foo": content => "fjskfjs\n", tag => "foofile", }
} else {
notice("storeconfigs not in use")
}
0 roach:~# puppet apply test-sc-off.pp
warning: You cannot collect without storeconfigs being set on line 5 in
file /root/test-sc-off.pp
notice: Scope(Class[main]): storeconfigs not in use
0 roach:~#
--
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.