Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,7 @@ The following parameters are available in the `puppetdb::database::postgresql` c
* [`listen_addresses`](#-puppetdb--database--postgresql--listen_addresses)
* [`puppetdb_server`](#-puppetdb--database--postgresql--puppetdb_server)
* [`database_name`](#-puppetdb--database--postgresql--database_name)
* [`database_locale`](#-puppetdb--database--postgresql--database_locale)
* [`database_username`](#-puppetdb--database--postgresql--database_username)
* [`database_password`](#-puppetdb--database--postgresql--database_password)
* [`database_port`](#-puppetdb--database--postgresql--database_port)
Expand Down Expand Up @@ -963,6 +964,14 @@ Sets the name of the database. Defaults to `puppetdb`.

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

##### <a name="-puppetdb--database--postgresql--database_locale"></a>`database_locale`

Data type: `Any`

Sets the locale of the database. Defaults to `C.UTF-8`.

Default value: `$puppetdb::params::database_locale`

##### <a name="-puppetdb--database--postgresql--database_username"></a>`database_username`

Data type: `Any`
Expand Down
6 changes: 5 additions & 1 deletion manifests/database/postgresql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# @param database_name
# Sets the name of the database. Defaults to `puppetdb`.
#
# @param database_locale
# Sets the locale of the database. Defaults to `C.UTF-8`.
#
# @param database_username
# Creates a user for access the database. Defaults to `puppetdb`.
#
Expand Down Expand Up @@ -74,6 +77,7 @@
$listen_addresses = $puppetdb::params::database_host,
$puppetdb_server = $puppetdb::params::puppetdb_server,
$database_name = $puppetdb::params::database_name,
$database_locale = $puppetdb::params::database_locale,
$database_username = $puppetdb::params::database_username,
Variant[String[1], Sensitive[String[1]]] $database_password = $puppetdb::params::database_password,
$database_port = $puppetdb::params::database_port,
Expand Down Expand Up @@ -150,7 +154,7 @@
user => $database_username,
password => $database_password,
encoding => 'UTF8',
locale => 'en_US.UTF-8',
locale => $database_locale,
grant => 'all',
port => $port,
}
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
$database_host = 'localhost'
$database_port = '5432'
$database_name = 'puppetdb'
$database_locale = 'C.UTF-8'
$database_username = 'puppetdb'
$database_password = 'puppetdb'
$manage_db_password = true
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/classes/database/postgresql_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
grant: 'all',
port: params[:database_port].to_i,
encoding: 'UTF8',
locale: 'en_US.UTF-8'
locale: 'C.UTF-8'
)
}

Expand Down
Loading