Skip to content

Commit

Permalink
Make sure puppetdb.conf contains correct entries depending on the ter…
Browse files Browse the repository at this point in the history
…minus version
  • Loading branch information
coreone committed Feb 24, 2021
1 parent 11dc0df commit ca17d77
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions manifests/master/puppetdb_conf.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit ca17d77

Please sign in to comment.