Thanks. We're doing that too. I'd like to be able to use $environment on an import line as well.
Is it a known issue that you cannot? On Wed, Feb 29, 2012 at 10:17 PM, Marek Dohojda <chro...@gmail.com> wrote: > Not sure that this is what you are looking for. however I think better way > is to set your environment in puppet.conf. > Like this: > [prod] > manifest=$confdir/$enironment/site.pp > > That way you have it all defined, and seperated. > > Also modules can be defined that way. > > Disclaimer not in front of computer so syntax maybe of, but I think it makes > the point. > Sent from my ASUS Eee Pad > > Me <info...@gmail.com> wrote: > >>Is it a known issue that you can't use the $environment variable in an >>"import" line? This is from site.pp on a system using environments, >>and it doesn't work: >> >>----------------------- >>notify { 'environment_notify': >> message => "NOTICE: This system is being configured with the >>environment ${environment}." >>} >> >>import "environments/$environment/nodes/*.pp" >>----------------------- >> >>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 >> >>I can change it to: >> >>import "environments/production/nodes/*.pp" >> >>..and things work. I get the message: >> >>notice: NOTICE: This system is being configured with the environment >>production. >> >>I'm on server and client version 2.6.4. Please let me know if there's >>a workaround here. I've tried things like ${environment} and various >>ways of quoting and not quoting. >> >>Thanks. >>-- >>twitter: @procnetdev >> >>-- >>You received this message because you are subscribed to the Google Groups >>"Puppet Users" group. >>To post to this group, send email to puppet-users@googlegroups.com. >>To unsubscribe from this group, send email to >>puppet-users+unsubscr...@googlegroups.com. >>For more options, visit this group at >>http://groups.google.com/group/puppet-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- twitter: @procnetdev -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.