Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
fixed the module for puppetdb 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mburger committed May 27, 2014
1 parent 2894315 commit 1d11994
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions manifests/init.pp
Expand Up @@ -392,19 +392,21 @@
name => $puppetdb::package,
}

if inline_template('<%= scope.lookupvar("::puppetdbversion")?1:0 %>') {
if $::puppetdbversion != '' {
$puppetdbversion = $::puppetdbversion
} else {
$puppetdbversion = '1.5'
$puppetdbversion = '2.0'
}

# This runs while installing the package
# but if something kills the keystore
# we have to regenerate it.
if versioncmp($puppetdbversion, '1.4') == -1 {
$ssl_setup_creates = '/etc/puppetdb/ssl/keystore.jks'
$ssl_setup_command = '/usr/sbin/puppetdb-ssl-setup'
} else {
$ssl_setup_creates = '/etc/puppetdb/ssl/private.pem'
$ssl_setup_command = '/usr/sbin/puppetdb ssl-setup'
file {'/etc/puppetdb/conf.d/jetty.ini':
ensure => $puppetdb::manage_file,
content => template($jetty_template),
Expand All @@ -413,7 +415,8 @@
}
}
if $puppetdb::bool_absent == false {
exec { '/usr/sbin/puppetdb-ssl-setup':
exec { 'puppetdb.ssl.setup':
command => $ssl_setup_command,
creates => $ssl_setup_creates,
notify => Service['puppetdb'],
require => Package['puppetdb'];
Expand Down

0 comments on commit 1d11994

Please sign in to comment.