Puppet Error Cannot set modulepath settings in puppet conf

0 votes

I have added 2 directories to the default module path:

  • /etc/puppetlabs/code/environments/production/modules/tools
  • /etc/puppetlabs/code/environments/production/modules/core
# puppet config set modulepath "/etc/puppetlabs/code/environments/production/modules/tools:/etc/puppetlabs/code/environments/production/modules/core:`puppet config print modulepath`"

But i'm getting this error:

# puppet config print modulepath
Error: Could not initialize global default settings: Cannot set modulepath settings in puppet.conf

What should I do to resolve it?

Aug 7, 2019 in Puppet by Karan
• 19,610 points
2,197 views

1 answer to this question.

0 votes

These extra module paths are specific to your production directory environment, so they can be appended in your production directory environment's environment.conf

#/etc/puppetlabs/code/environments/production/environment.conf /etc/puppetlabs/code/environments/production/modules/tools:/etc/puppetlabs/code/environments/production/modules/core:$basemodulepath

Your $basemodulepath is specified in your puppet.conf, typically at /etc/puppetlabs/puppet/puppet.conf. 

It is the value for basemodulepath in the INI format. 

modulepath from the config file is not used in the directory environment according to the documentation.

More information about environment.conf: https://docs.puppet.com/puppet/4.10/config_file_environment.html 

More information about appending module paths in your directory environment: https://docs.puppet.com/puppet/4.10/config_file_environment.html#modulepath

answered Aug 7, 2019 by Sirajul
• 59,230 points

Related Questions In Puppet

0 votes
1 answer

Service already defines error in Puppet

Hey @Rohan, try this: class MyClass { ...READ MORE

answered Feb 9, 2019 in Puppet by Monish
993 views
0 votes
1 answer

Error in PE-PostgreSQL installation : Puppet

When installing PE on machines with large amounts of ...READ MORE

answered Jul 31, 2019 in Puppet by Sirajul
• 59,230 points
874 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,918 views
+2 votes
1 answer
0 votes
1 answer
0 votes
1 answer

what is base modulepath in puppet?

The base modulepath is a list of ...READ MORE

answered Jul 30, 2019 in Puppet by Sirajul
• 59,230 points
894 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP