Skip to content

Commit 330e537

Browse files
author
Daniel Carabas
committed
Fix after review
1 parent 5a94c12 commit 330e537

22 files changed

+53
-77
lines changed

REFERENCE.md

+24-19
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Default value: `undef`
248248

249249
Data type: `Any`
250250

251-
251+
Scipt path for the connection validation check.
252252

253253
Default value: `undef`
254254

@@ -312,7 +312,7 @@ Default value: `undef`
312312

313313
Data type: `Any`
314314

315-
315+
Default connection settings.
316316

317317
Default value: {}
318318

@@ -377,7 +377,6 @@ Default value: `undef`
377377
Data type: `Any`
378378

379379
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
380-
Default value: 'postgres'.
381380

382381
Default value: `undef`
383382

@@ -466,23 +465,23 @@ Default value: `undef`
466465

467466
Data type: `Any`
468467

469-
468+
Allow Puppet to manage the pg_hba.conf file.
470469

471470
Default value: `undef`
472471

473472
##### `manage_pg_ident_conf`
474473

475474
Data type: `Any`
476475

477-
476+
Allow Puppet to manage the pg_ident.conf file.
478477

479478
Default value: `undef`
480479

481480
##### `manage_recovery_conf`
482481

483482
Data type: `Any`
484483

485-
484+
Allow Puppet to manage the recovery.conf file.
486485

487486
Default value: `undef`
488487

@@ -1059,7 +1058,7 @@ Default value: $postgresql::params::contrib_package_name
10591058

10601059
Data type: `String[1]`
10611060

1062-
Enum['present','absent']. Defaults to 'present'.
1061+
Enum['present','absent'].
10631062

10641063
Default value: 'present'
10651064

@@ -1123,15 +1122,15 @@ The following parameters are available in the `postgresql::server::postgis` clas
11231122

11241123
Data type: `String`
11251124

1126-
1125+
Sets the package name.
11271126

11281127
Default value: $postgresql::params::postgis_package_name
11291128

11301129
##### `package_ensure`
11311130

11321131
Data type: `String[1]`
11331132

1134-
1133+
Specifies if the package is present or not.
11351134

11361135
Default value: 'present'
11371136

@@ -1181,7 +1180,7 @@ The following parameters are available in the `postgresql::server::database` def
11811180

11821181
Data type: `Any`
11831182

1184-
1183+
Sets a comment on the database.
11851184

11861185
Default value: `undef`
11871186

@@ -1245,7 +1244,7 @@ Default value: `false`
12451244

12461245
Data type: `Any`
12471246

1248-
1247+
Specifies a hash of environment variables used when connecting to a remote server.
12491248

12501249
Default value: $postgresql::server::default_connect_settings
12511250

@@ -1470,7 +1469,7 @@ Default value: `undef`
14701469

14711470
Data type: `Any`
14721471

1473-
1472+
Specifies a hash of environment variables used when connecting to a remote server.
14741473

14751474
Default value: $postgresql::server::default_connect_settings
14761475

@@ -2015,15 +2014,15 @@ Default value: `false`
20152014

20162015
Data type: `Any`
20172016

2018-
2017+
Database used to connect to.
20192018

20202019
Default value: $postgresql::server::default_database
20212020

20222021
##### `port`
20232022

20242023
Data type: `Any`
20252024

2026-
2025+
Port to use when connecting.
20272026

20282027
Default value: `undef`
20292028

@@ -2139,7 +2138,7 @@ Default value: $title
21392138

21402139
Data type: `Any`
21412140

2142-
2141+
Specifies a hash of environment variables used when connecting to a remote server.
21432142

21442143
Default value: $postgresql::server::default_connect_settings
21452144

@@ -2187,7 +2186,7 @@ Default value: `undef`
21872186

21882187
Data type: `Any`
21892188

2190-
2189+
Port to use when connecting.
21912190

21922191
Default value: `undef`
21932192

@@ -2257,7 +2256,7 @@ Default value: $title
22572256

22582257
Data type: `Any`
22592258

2260-
2259+
Specifies a hash of environment variables used when connecting to a remote server.
22612260

22622261
Default value: $postgresql::server::default_connect_settings
22632262

@@ -2493,11 +2492,17 @@ An arbitrary tag for your own reference; the name of the message.
24932492

24942493
##### `unless`
24952494

2496-
Optional SQL command to execute before the main command
2495+
An optional SQL command to execute prior to the main :command;
2496+
this is generally intended to be used for idempotency, to check
2497+
for the existence of an object in the database to determine whether
2498+
or not the main SQL command needs to be executed at all.'
24972499

24982500
##### `onlyif`
24992501

2500-
Optional SQL command executed before the main command - return true if matching row found
2502+
An optional SQL command to execute prior to the main :command;
2503+
this is generally intended to be used for idempotency, to check
2504+
for the existence of an object in the database to determine whether
2505+
or not the main SQL command needs to be executed at all.
25012506

25022507
##### `connect_settings`
25032508

lib/puppet/type/postgresql_psql.rb

+12-12
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ def sync
2626
end
2727

2828
newparam(:unless) do
29-
desc 'Optional SQL command to execute before the main command'
30-
31-
desc 'An optional SQL command to execute prior to the main :command; ' \
32-
'this is generally intended to be used for idempotency, to check ' \
33-
'for the existence of an object in the database to determine whether ' \
34-
'or not the main SQL command needs to be executed at all.'
29+
desc <<-DOC
30+
An optional SQL command to execute prior to the main :command;
31+
this is generally intended to be used for idempotency, to check
32+
for the existence of an object in the database to determine whether
33+
or not the main SQL command needs to be executed at all.'
34+
DOC
3535

3636
# Return true if a matching row is found
3737
def matches(value)
@@ -47,12 +47,12 @@ def matches(value)
4747
end
4848

4949
newparam(:onlyif) do
50-
desc 'Optional SQL command executed before the main command - return true if matching row found'
51-
52-
desc 'An optional SQL command to execute prior to the main :command; ' \
53-
'this is generally intended to be used for idempotency, to check ' \
54-
'for the existence of an object in the database to determine whether ' \
55-
'or not the main SQL command needs to be executed at all.'
50+
desc <<-DOC
51+
An optional SQL command to execute prior to the main :command;
52+
this is generally intended to be used for idempotency, to check
53+
for the existence of an object in the database to determine whether
54+
or not the main SQL command needs to be executed at all.
55+
DOC
5656

5757
# Return true if a matching row is found
5858
def matches(value)

manifests/client.pp

-5
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@
55
#
66
# @param file_ensure
77
# Enum['file','absent'].
8-
#
98
# @param validcon_script_path
109
# Optional. Absolute path for the postgresql connection validation script.
11-
#
1210
# @param package_name
1311
# String. Sets the name of the PostgreSQL client package.
14-
#
1512
# @param package_ensure
1613
# Enum['present','absent'].
17-
#
18-
#
1914
class postgresql::client (
2015
Enum['file', 'absent'] $file_ensure = 'file',
2116
Stdlib::Absolutepath $validcon_script_path = $postgresql::params::validcon_script_path,

manifests/globals.pp

+5-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# @param service_status Overrides the default status check command for your PostgreSQL service.
2323
# @param default_database Specifies the name of the default database to connect with.
2424
#
25-
# @param validcon_script_path
25+
# @param validcon_script_path Scipt path for the connection validation check.
2626
#
2727
# @param initdb_path Path to the initdb command.
2828
# @param createdb_path Deprecated. Path to the createdb command.
@@ -31,7 +31,7 @@
3131
# @param pg_ident_conf_path Specifies the path to your pg_ident.conf file.
3232
# @param postgresql_conf_path Sets the path to your postgresql.conf file.
3333
# @param recovery_conf_path Path to your recovery.conf file.
34-
# @param default_connect_settings
34+
# @param default_connect_settings Default connection settings.
3535
#
3636
# @param pg_hba_conf_defaults Disables the defaults supplied with the module for pg_hba.conf if set to false. This is useful if you want to override the defaults. Be sure that your changes align with the rest of the module, as some access is required to perform some operations, such as basic psql operations.
3737
#
@@ -47,7 +47,6 @@
4747
# @param log_line_prefix Overrides the default PostgreSQL log prefix.
4848
#
4949
# @param user Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
50-
# Default value: 'postgres'.
5150
# @param group Overrides the default postgres user group to be used for related files in the file system.
5251
#
5352
# @param version The version of PostgreSQL to install and manage.
@@ -68,9 +67,9 @@
6867
#
6968
# @param timezone Sets the default timezone of the postgresql server. The postgresql built-in default is taking the systems timezone information.
7069
#
71-
# @param manage_pg_hba_conf
72-
# @param manage_pg_ident_conf
73-
# @param manage_recovery_conf
70+
# @param manage_pg_hba_conf Allow Puppet to manage the pg_hba.conf file.
71+
# @param manage_pg_ident_conf Allow Puppet to manage the pg_ident.conf file.
72+
# @param manage_recovery_conf Allow Puppet to manage the recovery.conf file.
7473
#
7574
# @param manage_package_repo Sets up official PostgreSQL repositories on your host if set to true.
7675
# @param module_workdir Specifies working directory under which the psql command should be executed. May need to specify if '/tmp' is on volume mounted with noexec option.

manifests/server/contrib.pp

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
# @param package_name
44
# String. The name of the PostgreSQL contrib package.
55
# @param package_ensure
6-
# Enum['present','absent']. Defaults to 'present'.
7-
#
8-
#
6+
# Enum['present','absent'].
97
class postgresql::server::contrib (
108
String $package_name = $postgresql::params::contrib_package_name,
119
String[1] $package_ensure = 'present'

manifests/server/database.pp

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# @summary Define for creating a database.
22
#
3-
# @param comment
3+
# @param comment Sets a comment on the database.
44
# @param dbname Sets the name of the database.
55
# @param owner Sets name of the database owner.
66
# @param tablespace Sets tablespace for where to create this database.
77
# @param template Specifies the name of the template database from which to build this database. Default value: 'template0'.
88
# @param encoding Overrides the character set during creation of the database.
99
# @param locale Overrides the locale during creation of the database.
1010
# @param istemplate Defines the database as a template if set to true.
11-
# @param connect_settings
12-
#
11+
# @param connect_settings Specifies a hash of environment variables used when connecting to a remote server.
1312
define postgresql::server::database(
1413
$comment = undef,
1514
$dbname = $title,

manifests/server/database_grant.pp

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# @param psql_db Defines the database to execute the grant against. This should not ordinarily be changed from the default
88
# @param psql_user Specifies the OS user for running psql. Default value: The default user for the module, usually 'postgres'.
99
# @param connect_settings Specifies a hash of environment variables used when connecting to a remote server.
10-
#
1110
define postgresql::server::database_grant(
1211
$privilege,
1312
$db,

manifests/server/db.pp

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
# @param template Specifies the name of the template database from which to build this database. Defaults value: template0.
1212
# @param istemplate Specifies that the database is a template, if set to true.
1313
# @param owner Sets a user as the owner of the database.
14-
#
15-
#
1614
define postgresql::server::db (
1715
$user,
1816
$password,

manifests/server/extension.pp

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
# @param ensure Specifies whether to activate or deactivate the extension. Valid options: 'present' or 'absent'.
1414
# @param package_name Specifies a package to install prior to activating the extension.
1515
# @param package_ensure Overrides default package deletion behavior. By default, the package specified with package_name is installed when the extension is activated and removed when the extension is deactivated. To override this behavior, set the ensure value for the package.
16-
# @param connect_settings
17-
#
16+
# @param connect_settings Specifies a hash of environment variables used when connecting to a remote server.
1817
define postgresql::server::extension (
1918
$database,
2019
$extension = $name,

manifests/server/grant.pp

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# @param onlyif_exists
1212
# @param connect_settings
1313
# @param ensure Specifies whether to grant or revoke the privilege. Default is to grant the privilege. Valid values: 'present', 'absent'.
14-
#
1514
define postgresql::server::grant (
1615
String $role,
1716
String $db,

manifests/server/grant_role.pp

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# @param psql_user Sets the OS user to run psql.
88
# @param port Port to use when connecting.
99
# @param connect_settings Specifies a hash of environment variables used when connecting to a remote server.
10-
#
1110
define postgresql::server::grant_role (
1211
String[1] $group,
1312
String[1] $role = $name,

manifests/server/pg_hba_rule.pp

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# @param order Sets an order for placing the rule in pg_hba.conf. This can be either a string or an integer. If it is an integer, it will be converted to a string by zero-padding it to three digits. E.g. 42 will be zero-padded to the string '042'. The pg_hba_rule fragments are sorted using the alpha sorting order. Default value: 150.
1212
# @param target Provides the target for the rule, and is generally an internal only property. Use with caution.
1313
# @param postgresql_version Manages pg_hba.conf without managing the entire PostgreSQL instance.
14-
#
1514
define postgresql::server::pg_hba_rule(
1615
Enum['local', 'host', 'hostssl', 'hostnossl'] $type,
1716
String $database,

manifests/server/pg_ident_rule.pp

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# @param description Sets a longer description for this rule if required. This description is placed in the comments above the rule in pg_ident.conf. Default value: 'none'.
77
# @param order Defines an order for placing the mapping in pg_ident.conf. Default value: 150.
88
# @param target Provides the target for the rule and is generally an internal only property. Use with caution.
9-
#
109
define postgresql::server::pg_ident_rule(
1110
$map_name,
1211
$system_username,

manifests/server/plperl.pp

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
# @param package_ensure The ensure parameter passed on to PostgreSQL PL/Perl package resource.
44
# @param package_name The name of the PostgreSQL PL/Perl package.
5-
#
65
class postgresql::server::plperl(
76
$package_ensure = 'present',
87
$package_name = $postgresql::server::plperl_package_name

manifests/server/plpython.pp

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# Enum['present','absent']. Specifies whether the package is present.
55
# @param package_name
66
# Specifies the name of the postgresql PL/Python package.
7-
#
87
class postgresql::server::plpython(
98
$package_ensure = 'present',
109
$package_name = $postgresql::server::plpython_package_name,

manifests/server/postgis.pp

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# @summary Install the postgis postgresql packaging.
22
#
3-
# @param package_name
4-
# @param package_ensure
5-
#
3+
# @param package_name Sets the package name.
4+
# @param package_ensure Specifies if the package is present or not.
65
class postgresql::server::postgis (
76
String $package_name = $postgresql::params::postgis_package_name,
87
String[1] $package_ensure = 'present'

manifests/server/reassign_owned_by.pp

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
# @param psql_user Specifies the OS user for running psql.
99
# @param port Port to use when connecting.
1010
# @param connect_settings Specifies a hash of environment variables used when connecting to a remote server.
11-
#
1211
define postgresql::server::reassign_owned_by (
1312
String $old_role,
1413
String $new_role,

0 commit comments

Comments
 (0)