(PDB-1353) Use settings::confdir for puppet_confdir

This commit adds conditionals to use `$settings::confdir` to introspect
the value for `$puppet_confdir` when available. This change is necessary
for compatibility with the path changes in Puppet 4.
This commit is contained in:
John Duarte 2015-03-30 13:16:00 -07:00
parent dcb94d9476
commit 4283af99bb

View file

@ -72,7 +72,11 @@ class puppetdb::params {
$confdir = '/etc/puppetdb/conf.d' $confdir = '/etc/puppetdb/conf.d'
$embedded_subname = 'file:/var/lib/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true' $embedded_subname = 'file:/var/lib/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
$puppetdb_initconf = '/etc/sysconfig/puppetdb' $puppetdb_initconf = '/etc/sysconfig/puppetdb'
$puppet_confdir = '/etc/puppet' if $settings::confdir != undef {
$puppet_confdir = $settings::confdir
} else {
$puppet_confdir = '/etc/puppet'
}
$puppet_service_name = 'puppetmaster' $puppet_service_name = 'puppetmaster'
$ssl_dir = '/etc/puppetdb/ssl' $ssl_dir = '/etc/puppetdb/ssl'
} }
@ -80,7 +84,11 @@ class puppetdb::params {
$confdir = '/etc/puppetdb/conf.d' $confdir = '/etc/puppetdb/conf.d'
$embedded_subname = 'file:/var/lib/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true' $embedded_subname = 'file:/var/lib/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
$puppetdb_initconf = '/etc/default/puppetdb' $puppetdb_initconf = '/etc/default/puppetdb'
$puppet_confdir = '/etc/puppet' if $settings::confdir != undef {
$puppet_confdir = $settings::confdir
} else {
$puppet_confdir = '/etc/puppet'
}
$puppet_service_name = 'puppetmaster' $puppet_service_name = 'puppetmaster'
$ssl_dir = '/etc/puppetdb/ssl' $ssl_dir = '/etc/puppetdb/ssl'
} }
@ -88,7 +96,11 @@ class puppetdb::params {
$confdir = '/etc/puppetdb/conf.d' $confdir = '/etc/puppetdb/conf.d'
$embedded_subname = 'file:/var/db/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true' $embedded_subname = 'file:/var/db/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
$puppetdb_initconf = undef $puppetdb_initconf = undef
$puppet_confdir = '/etc/puppet' if $settings::confdir != undef {
$puppet_confdir = $settings::confdir
} else {
$puppet_confdir = '/etc/puppet'
}
$puppet_service_name = 'puppetmasterd' $puppet_service_name = 'puppetmasterd'
$ssl_dir = '/etc/puppetdb/ssl' $ssl_dir = '/etc/puppetdb/ssl'
} }
@ -96,7 +108,11 @@ class puppetdb::params {
$confdir = '/usr/local/etc/puppetdb/conf.d' $confdir = '/usr/local/etc/puppetdb/conf.d'
$embedded_subname = 'file:/var/db/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true' $embedded_subname = 'file:/var/db/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
$puppetdb_initconf = undef $puppetdb_initconf = undef
$puppet_confdir = '/usr/local/etc/puppet' if $settings::confdir != undef {
$puppet_confdir = $settings::confdir
} else {
$puppet_confdir = '/usr/local/etc/puppet'
}
$puppet_service_name = 'puppetmaster' $puppet_service_name = 'puppetmaster'
$ssl_dir = '/usr/local/etc/puppetdb/ssl' $ssl_dir = '/usr/local/etc/puppetdb/ssl'
} }