Issue #12923 has been updated by eric sorenson.
I know it's bad, deprecated, etc. But this seems even wronger than I'd expect:
[eric@leterel ~/puppet-test]$ more file1.pp
if $hostname =~ /sfsfsfst/ {
import "file2.pp"
}
notice "Hey done with 1"
[eric@leterel ~/puppet-test]$ cat file2.pp
notice "Hey we're in 2"
[eric@leterel ~/puppet-test]$ puppet apply --confdir=/tmp ./file1.pp
notice: Scope(Class[main]): Hey we're in 2
notice: Scope(Class[main]): Hey done with 1
notice: Finished catalog run in 0.01 seconds
Is that known not to work?
----------------------------------------
Bug #12923: $environment doesn't work with import
https://projects.puppetlabs.com/issues/12923#change-56114
Author: Nathan Campi
Status: Rejected
Priority: High
Assignee: Nigel Kersten
Category: environments
Target version:
Affected Puppet version:
Keywords:
Branch:
Create a site.pp like this:
<pre>
notify { 'environment_notify':
message => "NOTICE: This system is being configured with the
environment ${environment}."
}
import "environments/$environment/nodes/*.pp"
</pre>
You'll get your environment in the notification, but then you'll get an error
from the import like:
<pre>
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could
not parse for environment production: Syntax error at 'environments/' at
/etc/puppet/manifests/site.pp:27 on node foobar
</pre>
Puppet version 2.6.4 on client and server. It's entirely appropriate, IMHO, for
puppet to be able to interpolate the $environment var on an import line.
Thanks.
--
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.