Issue #12923 has been updated by James Turnbull. Category set to environments Status changed from Unreviewed to Needs Decision Assignee set to Nigel Kersten
Nate - it's pretty unlikely we're going to fix this. We're deprecating import entirely in favour of autoloading and controlling what is loaded using the modulepath. Indeed that's the approach I'd recommend instead of doing anything with import. But I've asked Nigel to review the ticket. ---------------------------------------- Bug #12923: $environment doesn't work with import https://projects.puppetlabs.com/issues/12923#change-56057 Author: Nathan Campi Status: Needs Decision 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.
