2012-09-18 00:26:32 +02:00
|
|
|
# Class: puppetdb::master::puppetdb_conf
|
|
|
|
#
|
|
|
|
# This class manages the puppetdb.conf file for the puppet master.
|
|
|
|
#
|
|
|
|
# Parameters:
|
|
|
|
# ['server'] - The dns name or ip of the puppetdb server (defaults to localhost)
|
|
|
|
# ['port'] - The port that the puppetdb server is running on (defaults to 8081)
|
|
|
|
# ['puppet_confdir'] - The config directory of puppet (defaults to /etc/puppet)
|
|
|
|
#
|
|
|
|
# Actions:
|
|
|
|
# - Configures the required puppetdb settings for the puppet master by managing
|
|
|
|
# the puppetdb.conf file.
|
|
|
|
#
|
|
|
|
# Requires:
|
|
|
|
# - Inifile
|
|
|
|
#
|
|
|
|
# Sample Usage:
|
|
|
|
# class { 'puppetdb::master::puppetdb_conf':
|
|
|
|
# server => 'my.puppetdb.server'
|
|
|
|
# }
|
|
|
|
#
|
2012-09-20 23:46:26 +02:00
|
|
|
#
|
2012-10-01 19:46:33 +02:00
|
|
|
# TODO: finish porting this to use params
|
2012-09-20 23:46:26 +02:00
|
|
|
#
|
2012-09-18 00:26:32 +02:00
|
|
|
class puppetdb::master::puppetdb_conf(
|
2012-09-20 23:46:26 +02:00
|
|
|
$server = 'localhost',
|
|
|
|
$port = '8081',
|
2012-09-28 20:03:19 +02:00
|
|
|
$puppet_confdir = $puppetdb::params::puppet_confdir,
|
2012-09-20 23:46:26 +02:00
|
|
|
) {
|
2012-09-18 00:26:32 +02:00
|
|
|
|
2012-09-20 23:46:26 +02:00
|
|
|
Ini_setting {
|
|
|
|
ensure => present,
|
|
|
|
section => 'main',
|
|
|
|
path => "${puppet_confdir}/puppetdb.conf",
|
|
|
|
}
|
2012-09-18 00:26:32 +02:00
|
|
|
|
2012-09-20 23:46:26 +02:00
|
|
|
ini_setting {'puppetdbserver':
|
|
|
|
setting => 'server',
|
|
|
|
value => $server,
|
|
|
|
}
|
2012-09-18 00:26:32 +02:00
|
|
|
|
2012-09-20 23:46:26 +02:00
|
|
|
ini_setting {'puppetdbport':
|
|
|
|
setting => 'port',
|
|
|
|
value => $port,
|
|
|
|
}
|
2012-09-18 00:26:32 +02:00
|
|
|
}
|