From eac026c658553c33437e7befc75d9e7f9a3a6e3d Mon Sep 17 00:00:00 2001 From: Matthias Baur Date: Fri, 11 Jul 2014 11:14:40 +0200 Subject: [PATCH] Allow to set the manage_server parameter in the init class --- README.md | 4 ++++ manifests/database/postgresql.pp | 2 +- manifests/init.pp | 2 ++ manifests/params.pp | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3386ba7..cb35e59 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,10 @@ If true, the puppetdb web server will only serve HTTP and not HTTPS requests (de If true, open the ssl_listen\_port on the firewall (defaults to true). +###`manage_dbserver` + +If true, the PostgreSQL server will be managed by this module (defaults to true). + ####`database` Which database backend to use; legal values are `postgres` (default) or `embedded`. The `embedded` db can be used for very small installations or for testing, but is not recommended for use in production environments. For more info, see the [puppetdb docs](http://docs.puppetlabs.com/puppetdb/). diff --git a/manifests/database/postgresql.pp b/manifests/database/postgresql.pp index 0743ed8..43b38f4 100644 --- a/manifests/database/postgresql.pp +++ b/manifests/database/postgresql.pp @@ -6,7 +6,7 @@ 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, + $manage_server = $puppetdb::params::manage_dbserver, ) inherits puppetdb::params { if $manage_server == true { diff --git a/manifests/init.pp b/manifests/init.pp index 1178497..2f8cf7d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -8,6 +8,7 @@ class puppetdb( $ssl_listen_port = $puppetdb::params::ssl_listen_port, $disable_ssl = $puppetdb::params::disable_ssl, $open_ssl_listen_port = $puppetdb::params::open_ssl_listen_port, + $manage_dbserver = $puppetdb::params::manage_dbserver, $database = $puppetdb::params::database, $database_port = $puppetdb::params::database_port, $database_username = $puppetdb::params::database_username, @@ -106,6 +107,7 @@ class puppetdb( database_name => $database_name, database_username => $database_username, database_password => $database_password, + manage_server => $manage_server, before => [Class['puppetdb::server'],Class['puppetdb::server::validate_db']], } } diff --git a/manifests/params.pp b/manifests/params.pp index 006a2df..58588d2 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -11,6 +11,7 @@ class puppetdb::params { $open_postgres_port = undef $database = 'postgres' + $manage_dbserver = true # The remaining database settings are not used for an embedded database $database_host = 'localhost'