Skip to content

Commit da4f22d

Browse files
d1nuc0mbastelfreak
authored andcommitted
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 eac110a commit da4f22d

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

REFERENCE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,7 @@ The following parameters are available in the `puppetdb::database::postgresql` c
919919
* [`listen_addresses`](#-puppetdb--database--postgresql--listen_addresses)
920920
* [`puppetdb_server`](#-puppetdb--database--postgresql--puppetdb_server)
921921
* [`database_name`](#-puppetdb--database--postgresql--database_name)
922+
* [`database_locale`](#-puppetdb--database--postgresql--database_locale)
922923
* [`database_username`](#-puppetdb--database--postgresql--database_username)
923924
* [`database_password`](#-puppetdb--database--postgresql--database_password)
924925
* [`database_port`](#-puppetdb--database--postgresql--database_port)
@@ -963,6 +964,14 @@ Sets the name of the database. Defaults to `puppetdb`.
963964

964965
Default value: `$puppetdb::params::database_name`
965966

967+
##### <a name="-puppetdb--database--postgresql--database_locale"></a>`database_locale`
968+
969+
Data type: `Any`
970+
971+
Sets the locale of the database. Defaults to `C.UTF-8`.
972+
973+
Default value: `$puppetdb::params::database_locale`
974+
966975
##### <a name="-puppetdb--database--postgresql--database_username"></a>`database_username`
967976

968977
Data type: `Any`

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)