Ask Your Question
0

Applying setting using puppet's cli command doesn't appear to work?

asked 2016-04-21 04:28:21 -0500

schowdhury gravatar image

updated 2016-04-21 04:30:01 -0500

When I run the following command on my puppetmaster:

$ puppet config set reports datadog_reports --section master

It should add this setting in the 'master' of my puppet.conf file. However it ends up adding it to the 'main section instead':

$ cat /etc/puppetlabs/puppetpuppet.conf
[main]
server =xxxxxxxx.co.uk
reports = datadog_reports                           # this is in the wrong section
[master]
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
codedir = /etc/puppetlabs/code
autosign = true
certname = xxxxxx
server = xxxxxxx
[agent]
certname = xxxxxxx
server = xxxxxxx

I want to set this setting in the master section as per the following instructions:

https://forge.puppet.com/datadog/data...

By the way I am using Puppet version:

$ puppet --version
4.4.1
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-05-09 14:13:19 -0500

joshc gravatar image

The file path should be /etc/puppetlabs/puppet/puppet.conf, I assume that was just a typo in your post?

What user are you running the puppet config command as? When I run as root, I see the expected behavior:

# /opt/puppetlabs/bin/puppet config set reports datadog_reports --section master
# cat /etc/puppetlabs/puppet/puppet.conf
[main]
server =xxxxxxxx.co.uk
[master]
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
codedir = /etc/puppetlabs/code
autosign = true
certname = xxxxxx
server = xxxxxxx
reports = datadog_reports
[agent]
certname = xxxxxxx
server = xxxxxxx
# /opt/puppetlabs/bin/puppet --version
4.4.2

Are you managing puppet's config file with puppet? If so, perhaps your puppet config commands are being overwritten when the agent on the master next runs?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-04-21 04:28:21 -0500

Seen: 31 times

Last updated: May 09 '16