From 7ac589d4a970730647cb9cece0857a2706ec840b Mon Sep 17 00:00:00 2001 From: Andrew Teixeira Date: Thu, 19 Oct 2017 09:48:00 -0400 Subject: [PATCH] Make sure puppetdb.conf contains correct entries depending on the terminus version --- manifests/master/puppetdb_conf.pp | 34 ++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/manifests/master/puppetdb_conf.pp b/manifests/master/puppetdb_conf.pp index a3dd72fc..03bd471f 100644 --- a/manifests/master/puppetdb_conf.pp +++ b/manifests/master/puppetdb_conf.pp @@ -21,19 +21,29 @@ } if $legacy_terminus { - ini_setting { 'puppetdbserver': - setting => 'server', - value => $server, - } - ini_setting { 'puppetdbport': - setting => 'port', - value => $port, - } + $legacy_ensure = 'present' + $newterminus_ensure = 'absent' } else { - ini_setting { 'puppetdbserver_urls': - setting => 'server_urls', - value => "https://${server}:${port}/", - } + $legacy_ensure = 'absent' + $newterminus_ensure = 'present' + } + + ini_setting { 'puppetdbserver': + ensure => $legacy_ensure, + setting => 'server', + value => $server, + } + + ini_setting { 'puppetdbport': + ensure => $legacy_ensure, + setting => 'port', + value => $port, + } + + ini_setting { 'puppetdbserver_urls': + ensure => $newterminus_ensure, + setting => 'server_urls', + value => "https://${server}:${port}/", } ini_setting { 'soft_write_failure':