Skip to content

postgresql::server: Remove deprecated createdb_path parameter #1483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2023
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
18 changes: 0 additions & 18 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ The following parameters are available in the `postgresql::globals` class:
* [`default_database`](#-postgresql--globals--default_database)
* [`validcon_script_path`](#-postgresql--globals--validcon_script_path)
* [`initdb_path`](#-postgresql--globals--initdb_path)
* [`createdb_path`](#-postgresql--globals--createdb_path)
* [`psql_path`](#-postgresql--globals--psql_path)
* [`pg_hba_conf_path`](#-postgresql--globals--pg_hba_conf_path)
* [`pg_ident_conf_path`](#-postgresql--globals--pg_ident_conf_path)
Expand Down Expand Up @@ -356,14 +355,6 @@ Path to the initdb command.

Default value: `undef`

##### <a name="-postgresql--globals--createdb_path"></a>`createdb_path`

Data type: `Optional[Variant[String[1], Stdlib::Absolutepath]]`

Deprecated. Path to the createdb command.

Default value: `undef`

##### <a name="-postgresql--globals--psql_path"></a>`psql_path`

Data type: `Optional[Variant[String[1], Stdlib::Absolutepath]]`
Expand Down Expand Up @@ -856,7 +847,6 @@ The following parameters are available in the `postgresql::server` class:
* [`ipv4acls`](#-postgresql--server--ipv4acls)
* [`ipv6acls`](#-postgresql--server--ipv6acls)
* [`initdb_path`](#-postgresql--server--initdb_path)
* [`createdb_path`](#-postgresql--server--createdb_path)
* [`psql_path`](#-postgresql--server--psql_path)
* [`pg_hba_conf_path`](#-postgresql--server--pg_hba_conf_path)
* [`pg_ident_conf_path`](#-postgresql--server--pg_ident_conf_path)
Expand Down Expand Up @@ -1085,14 +1075,6 @@ Specifies the path to the initdb command.

Default value: `$postgresql::params::initdb_path`

##### <a name="-postgresql--server--createdb_path"></a>`createdb_path`

Data type: `Optional[Variant[String[1], Stdlib::Absolutepath]]`

Deprecated. Specifies the path to the createdb command.

Default value: `$postgresql::params::createdb_path`

##### <a name="-postgresql--server--psql_path"></a>`psql_path`

Data type: `Variant[String[1], Stdlib::Absolutepath]`
Expand Down
2 changes: 0 additions & 2 deletions manifests/globals.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
# @param validcon_script_path Scipt path for the connection validation check.
#
# @param initdb_path Path to the initdb command.
# @param createdb_path Deprecated. Path to the createdb command.
# @param psql_path Sets the path to the psql command.
# @param pg_hba_conf_path Specifies the path to your pg_hba.conf file.
# @param pg_ident_conf_path Specifies the path to your pg_ident.conf file.
Expand Down Expand Up @@ -124,7 +123,6 @@
Optional[String[1]] $validcon_script_path = undef,

Optional[Variant[String[1], Stdlib::Absolutepath]] $initdb_path = undef,
Optional[Variant[String[1], Stdlib::Absolutepath]] $createdb_path = undef,
Optional[Variant[String[1], Stdlib::Absolutepath]] $psql_path = undef,
Optional[Variant[String[1], Stdlib::Absolutepath]] $pg_hba_conf_path = undef,
Optional[Variant[String[1], Stdlib::Absolutepath]] $pg_ident_conf_path = undef,
Expand Down
5 changes: 0 additions & 5 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
# @param ipv6acls Lists strings for access control for connection method, users, databases, IPv6 addresses.
#
# @param initdb_path Specifies the path to the initdb command.
# @param createdb_path Deprecated. Specifies the path to the createdb command.
# @param psql_path Specifies the path to the psql command.
# @param pg_hba_conf_path Specifies the path to your pg_hba.conf file.
# @param pg_ident_conf_path Specifies the path to your pg_ident.conf file.
Expand Down Expand Up @@ -140,7 +139,6 @@
Array[String[1]] $ipv6acls = $postgresql::params::ipv6acls,

Variant[String[1], Stdlib::Absolutepath] $initdb_path = $postgresql::params::initdb_path,
Optional[Variant[String[1], Stdlib::Absolutepath]] $createdb_path = $postgresql::params::createdb_path,
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::params::psql_path,
Variant[String[1], Stdlib::Absolutepath] $pg_hba_conf_path = $postgresql::params::pg_hba_conf_path,
Variant[String[1], Stdlib::Absolutepath] $pg_ident_conf_path = $postgresql::params::pg_ident_conf_path,
Expand Down Expand Up @@ -192,9 +190,6 @@
Enum['pg_dump'] $backup_provider = $postgresql::params::backup_provider,
) inherits postgresql::params {
$_version = $postgresql::params::version
if $createdb_path != undef {
warning('Passing "createdb_path" to postgresql::server is deprecated, it can be removed safely for the same behaviour')
}

# Reload has its own ordering, specified by other defines
class { 'postgresql::server::reload':
Expand Down
5 changes: 0 additions & 5 deletions manifests/server/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
Boolean $istemplate = false,
Hash $connect_settings = $postgresql::server::default_connect_settings,
) {
$createdb_path = $postgresql::server::createdb_path
$user = $postgresql::server::user
$group = $postgresql::server::group
$psql_path = $postgresql::server::psql_path
Expand Down Expand Up @@ -79,10 +78,6 @@
default => "TABLESPACE \"${tablespace}\"",
}

if $createdb_path != undef {
warning('Passing "createdb_path" to postgresql::database is deprecated, it can be removed safely for the same behaviour')
}

postgresql_psql { "CREATE DATABASE \"${dbname}\"":
command => "CREATE DATABASE \"${dbname}\" WITH ${template_option} ${encoding_option} ${locale_option} ${tablespace_option}",
unless => "SELECT 1 FROM pg_database WHERE datname = '${dbname}'",
Expand Down