conditionally do not manage the postgres server itself, so users can separately declare postgresql::server and pass whatever options they want.

This commit is contained in:
Jason Antman 2014-02-20 15:35:16 -05:00
parent 1c94d83dce
commit 2ae8754efe
2 changed files with 11 additions and 4 deletions

View file

@ -416,6 +416,10 @@ Sets the password for the database user above. Defaults to `puppetdb`.
Conditionally manages the firewall for the PuppetDB host. Defaults to `true`.
####`manage_server`
Conditionally manages the PostgresQL server via `postgresql::server`. Defaults to `true`. If set to false, this class will create the database and user via `postgresql::server::db` but not attempt to install or manage the server itself.
Implementation
---------------

View file

@ -6,13 +6,16 @@ class puppetdb::database::postgresql(
$database_name = $puppetdb::params::database_name,
$database_username = $puppetdb::params::database_username,
$database_password = $puppetdb::params::database_password,
$manage_server = true,
) inherits puppetdb::params {
if $manage_server == true {
# get the pg server up and running
class { '::postgresql::server':
ip_mask_allow_all_users => '0.0.0.0/0',
listen_addresses => $listen_addresses,
manage_firewall => $manage_firewall,
class { '::postgresql::server':
ip_mask_allow_all_users => '0.0.0.0/0',
listen_addresses => $listen_addresses,
manage_firewall => $manage_firewall,
}
}
# create the puppetdb database