You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In lib/pupistry/agent.rb (build_modulepath sub) you forcefully prepend '<environment_path>/modules' to the modulepath no matter what.
In my case that's rather harmful as I have a environment.conf containing modulepath = modules/local:modules/external where modules/external contains all the r10k installed modules and modules/local contains my own modules.
In puppet 5.something this started to throw warnings on every puppet run, but well, warnings… 😄
From puppet 6.something onwards this throws an error like this:
Error: Unacceptable location. The name 'profiles::base' is unacceptable in file '/etc/puppetlabs/code/environments/master/modules/local/profiles/manifests/base.pp' (file: /etc/puppetlabs/code/environments/master/modules/local/profiles/manifests/base.pp, line: 1, column: 1) on node server.domain.tld
My solution is to remove the base modules path from modulespath.
For now I simply remove lines 173 to 175 from lib/pupistry/agent.rb and that works fine for me, but a better solution might be to not forcefully prepend <environment_path>/modulesif the user specified a custom modulepath in environment.conf.
I'm not really a ruby developer but I could try to provide a pull request if you're interested in having that functionality in.
The text was updated successfully, but these errors were encountered:
In
lib/pupistry/agent.rb
(build_modulepath
sub) you forcefully prepend '<environment_path>/modules' to the modulepath no matter what.In my case that's rather harmful as I have a environment.conf containing
modulepath = modules/local:modules/external
wheremodules/external
contains all the r10k installed modules andmodules/local
contains my own modules.In puppet 5.something this started to throw warnings on every puppet run, but well, warnings… 😄
From puppet 6.something onwards this throws an error like this:
My solution is to remove the base
modules
path from modulespath.For now I simply remove lines 173 to 175 from
lib/pupistry/agent.rb
and that works fine for me, but a better solution might be to not forcefully prepend<environment_path>/modules
if the user specified a custom modulepath in environment.conf.I'm not really a ruby developer but I could try to provide a pull request if you're interested in having that functionality in.
The text was updated successfully, but these errors were encountered: