diff --git a/manifests/server/database_ini.pp b/manifests/server/database_ini.pp index 80fdd66..5eed762 100644 --- a/manifests/server/database_ini.pp +++ b/manifests/server/database_ini.pp @@ -87,9 +87,11 @@ class puppetdb::server::database_ini( value => $database_username, } - ini_setting {'puppetdb_psdatabase_password': - setting => 'password', - value => $database_password, + if $database_password != undef { + ini_setting {'puppetdb_psdatabase_password': + setting => 'password', + value => $database_password, + } } } diff --git a/manifests/server/validate_db.pp b/manifests/server/validate_db.pp index 48495d4..5f693ed 100644 --- a/manifests/server/validate_db.pp +++ b/manifests/server/validate_db.pp @@ -52,7 +52,7 @@ class puppetdb::server::validate_db( ) inherits puppetdb::params { # We don't need any validation for the embedded database, presumably. - if ($database == 'postgres') { + if ($database == 'postgres' and $database_password != undef) { postgresql::validate_db_connection { 'validate puppetdb postgres connection': database_host => $database_host, database_port => $database_port,