2

I'm fighting with Puppet storeconfigs of many hours and finally I found one thing which confusing me. I would like to set up storeconfigs, but when I set storeconfigs and storeconfigs_backend values in /etc/puppet/puppet.conf files [master] section it doesn't work. But when I test put those values in [main] section it some how works.

Why Puppet ignore [master] section configuration while their documentation said that storeconfigs belong into [master] section?

I using Puppet 3.8.2 and Ubuntu 14.04.

https://docs.puppetlabs.com/puppetdb/latest/connect_puppet_master.html

To enable saving facts and catalogs in PuppetDB, add the following settings to the [master] block of puppet.conf (or edit them if already present):

[master]
storeconfigs = true
storeconfigs_backend = puppetdb

There is my puppet.conf file at beginning.

$ cat /etc/puppet/puppet.conf
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter

[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

I got same answer from Puppet

$ sudo puppet config print | grep ^storeconfigs
storeconfigs = false
storeconfigs_backend = active_record

I set storeconfigs and storeconfigs_backend values into puppet.conf file [master] section, but it doesn't work and storeconfigs value is still false.

$ sudo puppet config set storeconfigs true --section master
$ sudo puppet config set storeconfigs_backend puppetdb --section master
$ sudo puppet config print | grep ^storeconfigs
storeconfigs = false
storeconfigs_backend = active_record

I just test put those values into puppet.conf file [main] section, and it works.

$ sudo puppet config set storeconfigs true --section main
$ sudo puppet config set storeconfigs_backend puppetdb --section main
$ sudo puppet config print | grep ^storeconfigs
storeconfigs = true
storeconfigs_backend = puppetdb
kiuru
  • 21
  • 1
  • The --section master would be needed in the query and the setting of the config item. So try ... "puppet config print storeconfigs --section master". [main] is the global section, so setting something there means every section "inherits" it. – Ken Barber Sep 07 '15 at 11:26

2 Answers2

2

Puppet has rearranged their config files a couple of times, and the sections that things live in. I've given up trying to keep track of it all, and I instead just use puppet config print | less and see which section Puppet wants particular config items in today, and then just put them there.

womble
  • 95,029
  • 29
  • 173
  • 228
1

Configuration queries

To see the configuration visible from "puppet master", you can use

puppet master --configprint all | grep storeconfigs

or

puppet master --configprint storeconfigs
puppet master --configprint storeconfigs_backend

…which will use the configuration in the defaults in the [main] section, as well as the [master] specific section.

ssm
  • 86
  • 5