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 in Puppet by Karan
• 1,170 points
10 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 by Sirajul
• 16,880 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 in Puppet by Monish
34 views
0 votes
1 answer
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
111 views
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 in Puppet by Sirajul
• 16,880 points
10 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 in Puppet by Sirajul
• 16,880 points
20 views