2013-10-21 17:21:12 +02:00
|
|
|
# This class configures the puppet master to enable storeconfigs and to use
|
|
|
|
# puppetdb as the storeconfigs backend. See README.md for more details.
|
2014-10-07 16:06:54 +02:00
|
|
|
class puppetdb::master::storeconfigs (
|
|
|
|
$puppet_conf = $puppetdb::params::puppet_conf,
|
2015-01-15 10:13:51 +01:00
|
|
|
$masterless = $puppetdb::params::masterless,
|
2012-10-26 20:42:40 +02:00
|
|
|
) inherits puppetdb::params {
|
2012-09-18 00:26:32 +02:00
|
|
|
|
2015-01-15 10:13:51 +01:00
|
|
|
if $masterless {
|
|
|
|
$puppet_conf_section = 'main'
|
|
|
|
} else {
|
|
|
|
$puppet_conf_section = 'master'
|
|
|
|
}
|
|
|
|
|
2014-10-07 16:06:54 +02:00
|
|
|
Ini_setting {
|
2015-01-15 10:13:51 +01:00
|
|
|
section => $puppet_conf_section,
|
2012-09-18 00:26:32 +02:00
|
|
|
path => $puppet_conf,
|
|
|
|
ensure => present,
|
|
|
|
}
|
|
|
|
|
2015-01-15 10:13:51 +01:00
|
|
|
ini_setting { "puppet.conf/${puppet_conf_section}/storeconfigs":
|
2012-09-18 00:26:32 +02:00
|
|
|
setting => 'storeconfigs',
|
|
|
|
value => true,
|
|
|
|
}
|
|
|
|
|
2015-01-15 10:13:51 +01:00
|
|
|
ini_setting { "puppet.conf/${puppet_conf_section}/storeconfigs_backend":
|
2012-09-18 00:26:32 +02:00
|
|
|
setting => 'storeconfigs_backend',
|
|
|
|
value => 'puppetdb',
|
|
|
|
}
|
|
|
|
}
|