Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2012-09-23 - Chris Price <chris@puppetlabs.com>
* 1.0.3 release

2012-09-23 - Chris Price <chris@puppetlabs.com>
* Add a parameter for restarting puppet master (179b337)

2012-09-21 - Chris Price <chris@puppetlabs.com>
* 1.0.2 release

Expand Down
2 changes: 1 addition & 1 deletion Modulefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name 'puppetlabs-puppetdb'
version '1.0.2'
version '1.0.3'
source 'git://github.com/puppetlabs-puppet/puppetlabs-puppetdb.git'
author 'Puppet Labs'
description 'PuppetDB resource types'
Expand Down
29 changes: 19 additions & 10 deletions manifests/master/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
# be installed. You may specify an explicit version
# number, 'present', or 'latest'. Defaults to
# 'present'.
# ['restart_puppet'] - If true, the module will restart the puppet master when
# necessary. The default is 'true'. If set to 'false',
# you must restart the service manually in order to pick
# up changes to the config files (other than `puppet.conf`).
#
# Actions:
# - Configures the puppet master to use puppetdb.
Expand All @@ -46,6 +50,7 @@
$puppet_confdir = '/etc/puppet',
$puppet_conf = '/etc/puppet/puppet.conf',
$puppetdb_version = $puppetdb::params::puppetdb_version,
$restart_puppet = true,
) inherits puppetdb::params {

package { 'puppetdb-terminus':
Expand All @@ -66,21 +71,12 @@
# this validator."
Service<|title == 'puppetdb'|> -> Puppetdb_conn_validator['puppetdb_conn']

# We will need to restart the puppet master service if certain config
# files are changed, so here we make sure it's in the catalog.
if ! defined(Service[$puppetdb::params::puppet_service_name]) {
service { $puppetdb::params::puppet_service_name:
ensure => running,
}
}

# Conditionally manage the `routes.yaml` file. Restart the puppet service
# if changes are made.
if ($manage_routes) {
class { 'puppetdb::master::routes':
puppet_confdir => $puppet_confdir,
require => Puppetdb_conn_validator['puppetdb_conn'],
notify => Service[$puppetdb::params::puppet_service_name],
}
}

Expand All @@ -101,6 +97,19 @@
port => $puppetdb_port,
puppet_confdir => $puppet_confdir,
require => Puppetdb_conn_validator['puppetdb_conn'],
notify => Service[$puppetdb::params::puppet_service_name],
}

if ($restart_puppet) {
# We will need to restart the puppet master service if certain config
# files are changed, so here we make sure it's in the catalog.
if ! defined(Service[$puppetdb::params::puppet_service_name]) {
service { $puppetdb::params::puppet_service_name:
ensure => running,
}
}

Class['puppetdb::master::puppetdb_conf'] ~> Service[$puppetdb::params::puppet_service_name]
Class['puppetdb::master::routes'] ~> Service[$puppetdb::params::puppet_service_name]
}

}