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!