Skip to content

Commit 7513c06

Browse files
committed
fix: revert DB locale to C
* EN_us.UTF-8 choice breaks install if the locale is not installed on the system, revert default DB locale to C.UTF-8 * Introduce database_locale to change it Kudos @JGodin-C2C @saimonn References puppetlabs/puppetlabs-puppetdb#412 puppetlabs/puppetlabs-puppetdb#421 puppetlabs/puppetlabs-puppetdb#422
1 parent 725385d commit 7513c06

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

manifests/database/postgresql.pp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
# @param database_name
1313
# Sets the name of the database. Defaults to `puppetdb`.
1414
#
15+
# @param database_locale
16+
# Sets the locale of the database. Defaults to `C.UTF-8`.
17+
#
1518
# @param database_username
1619
# Creates a user for access the database. Defaults to `puppetdb`.
1720
#
@@ -74,6 +77,7 @@
7477
$listen_addresses = $puppetdb::params::database_host,
7578
$puppetdb_server = $puppetdb::params::puppetdb_server,
7679
$database_name = $puppetdb::params::database_name,
80+
$database_locale = $puppetdb::params::database_locale,
7781
$database_username = $puppetdb::params::database_username,
7882
Variant[String[1], Sensitive[String[1]]] $database_password = $puppetdb::params::database_password,
7983
$database_port = $puppetdb::params::database_port,
@@ -150,7 +154,7 @@
150154
user => $database_username,
151155
password => $database_password,
152156
encoding => 'UTF8',
153-
locale => 'en_US.UTF-8',
157+
locale => $database_locale,
154158
grant => 'all',
155159
port => $port,
156160
}

manifests/params.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
$database_host = 'localhost'
3636
$database_port = '5432'
3737
$database_name = 'puppetdb'
38+
$database_locale = 'C.UTF-8'
3839
$database_username = 'puppetdb'
3940
$database_password = 'puppetdb'
4041
$manage_db_password = true

0 commit comments

Comments
 (0)