I don't specify the environment for the master at all and haven't had any 
problems thus far with the wrong environment being picked up. I have 
'Production' set as the client environment and will pass specific 
environments to the agent via 'puppet agent -t --environment=MYDEVENV', 
though Craig's suggestion does make more sense given you're using an ENC.

On Friday, January 23, 2015 at 12:04:22 AM UTC-8, Evgeniy Troitskiy wrote:
>
> Hello all!
>
> I have a directory environments configured in Puppet (production and 
> development) and I use the Foreman as an ENC.
>
> When I try to set development environment for the host in Foreman, then 
> Puppet agent execute module from right environment. But if agent try to 
> access to *files* folder (puppet:///modules/$module_name/testfile), it 
> gets testfile from same directory from production not from development. And 
> if I change environment to development in Puppet agent config file - 
> puppet:///modules/$module_name/testfile links to right place in development 
> environment.
>
> How can I correct this?
>
> Additional info:
>
> *part of puppet.conf*
>
> [master]
>
>     environment       = production
>
>     environmentpath   = /etc/puppet/environments
>
> *part of fileserver.conf*
>
> [development]
>
>    path /etc/puppet/environments/development/files
>
>    allow *
>
> [production]
>
>    path /etc/puppet/environments/production/files
>
>    allow *
>
> */etc/puppet/environments/*
>
> ├── production
>
> │   ├── files
>
> │   ├── manifests
>
> │   └── modules
>
> └── development
>
>     ├── files
>
>     ├── manifests
>
>     └── modules 
>
> Thanks for advice!
>
>
> -- 
>
> Regards,
>
> Evgeniy Troitskiy
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7acb0593-ca69-4a15-8e83-520ddd64a81a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to