Puppet on windows ignoring puppet.conf

276 views
Skip to first unread message

Mattis Haase

unread,
Apr 19, 2016, 10:38:20 AM4/19/16
to Puppet Users
Hello,

we have been using puppet for unix machines for quite a while and it works fine.

I have installed the latest puppet-agent (1.4.1) on Windows Server 2012R2. The installation went fine and the communication between the puppetmaster and the client works.

However, it uses the production environment, ignoring the environment setting in:

c:\program files\puppet labs\puppet\etc\puppet.conf

It is worth noting that this folder did originally not exist. The folder for the conf files was:

c:\program files\puppet labs\puppet\puppet\conf

However, all documentation points torwards the first folder. I put the same puppet conf into these three folders:

c:\program files\puppet labs\puppet\puppet\conf
c:\program files\puppet labs\puppet\puppet\etc
c:\program files\puppet labs\puppet\etc

The contents of the file are this:

# This file can be used to override the default puppet settings.
# See the following links for more details on what settings are available:
[main]
server=puppetmaster.develop.local
environment=develop

However, it still tries to pull from the production environment.
 
puppet.bat agent --configprint environment
production

I restarted the service, to no avail. 

Mike Sharpton

unread,
Apr 19, 2016, 10:56:56 AM4/19/16
to Puppet Users
Note sure if they changed the path with 1.4.1.  The path used to be what is below.  May want to try that.

C:\programdata\PuppetLabs\puppet\etc

Josh Cooper

unread,
Apr 19, 2016, 1:26:52 PM4/19/16
to puppet...@googlegroups.com
On Tue, Apr 19, 2016 at 7:56 AM, Mike Sharpton <shar...@gmail.com> wrote:
Note sure if they changed the path with 1.4.1.  The path used to be what is below.  May want to try that.

Just to confirm, we haven't changed the location of where puppet.conf goes.
 

C:\programdata\PuppetLabs\puppet\etc

Yep that's the one. Note C:\ProgramData is by default hidden.

Also you can ask puppet where it thinks its puppet.conf should be (so you can be sure you're editing the same file that the agent will read):

C:\>puppet agent --configprint config
C:/ProgramData/PuppetLabs/puppet/etc/puppet.conf

Note if you are running puppet not elevated, it will attempt to use the per-user location:

C:\>puppet agent --configprint config
C:/Users/<user>/.puppetlabs/etc/puppet/puppet.conf

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/51f8bdbc-875e-44a5-bbbf-4014e31b3ebc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Josh Cooper
Developer, Puppet

PuppetConf 2016, October 17-21, San Diego, California
Early Birds save $350 - Register by June 30th

Mattis Haase

unread,
Apr 21, 2016, 7:56:24 AM4/21/16
to Puppet Users
Ah, ok. Program Data != Program Files. I use german Windows so I didn't realize the difference right away. 

Thanks for the quick response.
Reply all
Reply to author
Forward
0 new messages