Skip to content

Commit dd57e38

Browse files
committed
Merge pull request #78 from nicklewis/optional-password
Make database_password an optional parameter
2 parents 45a745f + 2f12a5d commit dd57e38

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

manifests/server/database_ini.pp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@
5454
value => $database_username,
5555
}
5656

57-
ini_setting {'puppetdb_psdatabase_password':
58-
setting => 'password',
59-
value => $database_password,
57+
if $database_password != undef {
58+
ini_setting {'puppetdb_psdatabase_password':
59+
setting => 'password',
60+
value => $database_password,
61+
}
6062
}
6163
}
6264

manifests/server/validate_db.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
) inherits puppetdb::params {
5353

5454
# We don't need any validation for the embedded database, presumably.
55-
if ($database == 'postgres') {
55+
if ($database == 'postgres' and $database_password != undef) {
5656
postgresql::validate_db_connection { 'validate puppetdb postgres connection':
5757
database_host => $database_host,
5858
database_port => $database_port,

0 commit comments

Comments
 (0)