Skip to content

Commit 192beac

Browse files
committed
Adjusting datatypes
1 parent 5ae2e79 commit 192beac

30 files changed

+157
-157
lines changed

manifests/backup/pg_dump.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@
4242
#
4343
class postgresql::backup::pg_dump (
4444
String[1] $dir,
45+
Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], Pattern[/./]] $ensure = 'present',
4546
Boolean $compress = true,
4647
Array $databases = [],
4748
Boolean $delete_before_dump = false,
4849
String[1] $dir_group = '0',
4950
String[1] $dir_mode = '0700',
5051
String[1] $dir_owner = 'root',
51-
Enum['present','absent'] $ensure = 'present',
5252
Enum['plain','custom','directory','tar'] $format = 'plain',
5353
Boolean $install_cron = true,
5454
Boolean $manage_user = false,

manifests/client.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# @param package_ensure
1313
# Ensure the client package is installed
1414
class postgresql::client (
15-
Enum['file', 'absent'] $file_ensure = 'file',
16-
Stdlib::Absolutepath $validcon_script_path = $postgresql::params::validcon_script_path,
17-
String[1] $package_name = $postgresql::params::client_package_name,
18-
Enum['present', 'absent', 'latest'] $package_ensure = 'present'
15+
Enum['file', 'absent'] $file_ensure = 'file',
16+
Stdlib::Absolutepath $validcon_script_path = $postgresql::params::validcon_script_path,
17+
String[1] $package_name = $postgresql::params::client_package_name,
18+
Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], Pattern[/./]] $package_ensure = 'present'
1919
) inherits postgresql::params {
2020
if $package_name != 'UNSET' {
2121
package { 'postgresql-client':

manifests/dnfmodule.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# @api private
88
class postgresql::dnfmodule (
9-
String[1] $ensure = 'installed',
9+
Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], Pattern[/./]] $ensure = 'installed',
1010
String[1] $module = 'postgresql',
1111
) {
1212
package { 'postgresql dnf module':

manifests/globals.pp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@
115115

116116
Optional[String[1]] $validcon_script_path = undef,
117117

118-
Optional[String[1]] $initdb_path = undef,
119-
Optional[String[1]] $createdb_path = undef,
120-
Optional[String[1]] $psql_path = undef,
121-
Optional[String[1]] $pg_hba_conf_path = undef,
122-
Optional[String[1]] $pg_ident_conf_path = undef,
123-
Optional[String[1]] $postgresql_conf_path = undef,
124-
Optional[Stdlib::Filemode] $postgresql_conf_mode = undef,
125-
Optional[String[1]] $recovery_conf_path = undef,
126-
Hash $default_connect_settings = {},
118+
Optional[Variant[String[1], Stdlib::Absolutepath]] $initdb_path = undef,
119+
Optional[Variant[String[1], Stdlib::Absolutepath]] $createdb_path = undef,
120+
Optional[Variant[String[1], Stdlib::Absolutepath]] $psql_path = undef,
121+
Optional[Variant[String[1], Stdlib::Absolutepath]] $pg_hba_conf_path = undef,
122+
Optional[Variant[String[1], Stdlib::Absolutepath]] $pg_ident_conf_path = undef,
123+
Optional[Variant[String[1], Stdlib::Absolutepath]] $postgresql_conf_path = undef,
124+
Optional[Stdlib::Filemode] $postgresql_conf_mode = undef,
125+
Optional[Variant[String[1], Stdlib::Absolutepath]] $recovery_conf_path = undef,
126+
Hash $default_connect_settings = {},
127127

128128
Optional[Boolean] $pg_hba_conf_defaults = undef,
129129

manifests/lib/devel.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#
1010
#
1111
class postgresql::lib::devel (
12-
String $package_name = $postgresql::params::devel_package_name,
13-
Enum['present', 'absent', 'latest'] $package_ensure = 'present',
14-
Boolean $link_pg_config = $postgresql::params::link_pg_config
12+
Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], Pattern[/./]] $package_ensure = 'present',
13+
String $package_name = $postgresql::params::devel_package_name,
14+
Boolean $link_pg_config = $postgresql::params::link_pg_config
1515
) inherits postgresql::params {
1616
if $facts['os']['family'] == 'Gentoo' {
1717
fail('osfamily Gentoo does not have a separate "devel" package, postgresql::lib::devel is not supported')

manifests/lib/docs.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#
1111
#
1212
class postgresql::lib::docs (
13-
String $package_name = $postgresql::params::docs_package_name,
14-
Enum['present', 'absent', 'latest'] $package_ensure = 'present',
13+
String $package_name = $postgresql::params::docs_package_name,
14+
Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], Pattern[/./]] $package_ensure = 'present',
1515
) inherits postgresql::params {
1616
package { 'postgresql-docs':
1717
ensure => $package_ensure,

manifests/lib/java.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
# Specifies whether the package is present.
1010
#
1111
class postgresql::lib::java (
12-
String $package_name = $postgresql::params::java_package_name,
13-
Enum['present', 'absent', 'latest'] $package_ensure = 'present'
12+
String $package_name = $postgresql::params::java_package_name,
13+
Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], Pattern[/./]] $package_ensure = 'present'
1414
) inherits postgresql::params {
1515
package { 'postgresql-jdbc':
1616
ensure => $package_ensure,

manifests/lib/perl.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# Ensure the perl libs for postgresql are installed.
77
#
88
class postgresql::lib::perl (
9-
String $package_name = $postgresql::params::perl_package_name,
10-
Enum['present', 'absent', 'latest'] $package_ensure = 'present'
9+
String $package_name = $postgresql::params::perl_package_name,
10+
Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], Pattern[/./]] $package_ensure = 'present'
1111
) inherits postgresql::params {
1212
package { 'perl-DBD-Pg':
1313
ensure => $package_ensure,

manifests/lib/python.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# Ensure the python libs for postgresql are installed.
77
#
88
class postgresql::lib::python (
9-
String[1] $package_name = $postgresql::params::python_package_name,
10-
Enum['present', 'absent', 'latest'] $package_ensure = 'present'
9+
String[1] $package_name = $postgresql::params::python_package_name,
10+
Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], Pattern[/./]] $package_ensure = 'present'
1111
) inherits postgresql::params {
1212
package { 'python-psycopg2':
1313
ensure => $package_ensure,

manifests/server.pp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@
9191
class postgresql::server (
9292
Optional[Variant[String[1], Sensitive[String[1]], Integer]] $postgres_password = undef,
9393

94+
Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], Pattern[/./]] $package_ensure = $postgresql::params::package_ensure,
9495
String[1] $package_name = $postgresql::params::server_package_name,
95-
Enum['present', 'absent', 'latest'] $package_ensure = $postgresql::params::package_ensure,
9696

9797
Optional[String[1]] $plperl_package_name = $postgresql::params::plperl_package_name,
9898
Optional[String[1]] $plpython_package_name = $postgresql::params::plpython_package_name,
@@ -108,20 +108,20 @@
108108
String[1] $default_database = $postgresql::params::default_database,
109109
Hash $default_connect_settings = $postgresql::globals::default_connect_settings,
110110
Optional[String[1]] $listen_addresses = $postgresql::params::listen_addresses,
111-
Variant[String[1], Integer] $port = $postgresql::params::port,
111+
Variant[String[1], Stdlib::Port] $port = $postgresql::params::port,
112112
String[1] $ip_mask_deny_postgres_user = $postgresql::params::ip_mask_deny_postgres_user,
113113
String[1] $ip_mask_allow_all_users = $postgresql::params::ip_mask_allow_all_users,
114114
Array[String[1]] $ipv4acls = $postgresql::params::ipv4acls,
115115
Array[String[1]] $ipv6acls = $postgresql::params::ipv6acls,
116116

117-
String[1] $initdb_path = $postgresql::params::initdb_path,
118-
Optional[String[1]] $createdb_path = $postgresql::params::createdb_path,
119-
String[1] $psql_path = $postgresql::params::psql_path,
120-
String[1] $pg_hba_conf_path = $postgresql::params::pg_hba_conf_path,
121-
String[1] $pg_ident_conf_path = $postgresql::params::pg_ident_conf_path,
122-
String[1] $postgresql_conf_path = $postgresql::params::postgresql_conf_path,
123-
Optional[Stdlib::Filemode] $postgresql_conf_mode = $postgresql::params::postgresql_conf_mode,
124-
String[1] $recovery_conf_path = $postgresql::params::recovery_conf_path,
117+
Variant[String[1], Stdlib::Absolutepath] $initdb_path = $postgresql::params::initdb_path,
118+
Optional[Variant[String[1], Stdlib::Absolutepath]] $createdb_path = $postgresql::params::createdb_path,
119+
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::params::psql_path,
120+
Variant[String[1], Stdlib::Absolutepath] $pg_hba_conf_path = $postgresql::params::pg_hba_conf_path,
121+
Variant[String[1], Stdlib::Absolutepath] $pg_ident_conf_path = $postgresql::params::pg_ident_conf_path,
122+
Variant[String[1], Stdlib::Absolutepath] $postgresql_conf_path = $postgresql::params::postgresql_conf_path,
123+
Optional[Stdlib::Filemode] $postgresql_conf_mode = $postgresql::params::postgresql_conf_mode,
124+
Variant[String[1], Stdlib::Absolutepath] $recovery_conf_path = $postgresql::params::recovery_conf_path,
125125

126126
String[1] $datadir = $postgresql::params::datadir,
127127
Optional[String[1]] $xlogdir = $postgresql::params::xlogdir,

0 commit comments

Comments
 (0)