diff --git a/README.md b/README.md index 285e2f1..d35f7be 100644 --- a/README.md +++ b/README.md @@ -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 --------------- diff --git a/manifests/database/postgresql.pp b/manifests/database/postgresql.pp index 2135284..0743ed8 100644 --- a/manifests/database/postgresql.pp +++ b/manifests/database/postgresql.pp @@ -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