Skip to content

Commit 6dee3b8

Browse files
cruelsmithbastelfreak
authored andcommitted
Update REFERENCE.md
* Fixing lint 140chars inside REFERENCE.md
1 parent 985309e commit 6dee3b8

23 files changed

+443
-206
lines changed

Diff for: REFERENCE.md

+259-118
Large diffs are not rendered by default.

Diff for: manifests/backup/pg_dump.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
# @param manage_user
2727
# Manage creation of the backup user.
2828
# @param optional_args
29-
# Specifies an array of optional arguments which should be passed through to the backup tool. These options are not validated, unsupported options may break the backup.
29+
# Specifies an array of optional arguments which should be passed through to the backup tool. These options are not validated,
30+
# unsupported options may break the backup.
3031
# @param post_script
3132
# One or more scripts that are executed when the backup is finished. This could be used to sync the backup to a central store.
3233
# @param pre_script
@@ -39,7 +40,6 @@
3940
# An array of two elements to set the backup time. Allows `['23', '5']` (i.e., 23:05) or `['3', '45']` (i.e., 03:45) for HH:MM times.
4041
# @param weekday
4142
# Weekdays on which the backup job should run. Defaults to `*`. This parameter is passed directly to the cron resource.
42-
#
4343
class postgresql::backup::pg_dump (
4444
String[1] $dir,
4545
Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]] $ensure = 'present',

Diff for: manifests/globals.pp

+17-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#
33
# @note
44
# Most server-specific defaults should be overridden in the postgresql::server class.
5-
# This class should be used only if you are using a non-standard OS, or if you are changing elements that can only be changed here, such as version or manage_package_repo.
5+
# This class should be used only if you are using a non-standard OS, or if you are changing elements that can only be changed here, such
6+
# as version or manage_package_repo.
67
#
78
#
89
# @param client_package_name Overrides the default PostgreSQL client package name.
@@ -40,8 +41,10 @@
4041
# Overrides the default PostgreSQL data directory for the target platform.
4142
# Changing the datadir after installation causes the server to come to a full stop before making the change.
4243
# For Red Hat systems, the data directory must be labeled appropriately for SELinux.
43-
# On Ubuntu, you must explicitly set needs_initdb = true to allow Puppet to initialize the database in the new datadir (needs_initdb defaults to true on other systems).
44-
# Warning! If datadir is changed from the default, Puppet does not manage purging of the original data directory, which causes it to fail if the data directory is changed back to the original
44+
# On Ubuntu, you must explicitly set needs_initdb = true to allow Puppet to initialize the database in the new datadir (needs_initdb
45+
# defaults to true on other systems).
46+
# Warning! If datadir is changed from the default, Puppet does not manage purging of the original data directory, which causes it to fail
47+
# if the data directory is changed back to the original
4548
#
4649
# @param confdir Overrides the default PostgreSQL configuration directory for the target platform.
4750
# @param bindir Overrides the default PostgreSQL binaries directory for the target platform.
@@ -59,20 +62,24 @@
5962
# @param repo_baseurl Sets the baseurl for the PostgreSQL repository. Useful if you host your own mirror of the repository.
6063
# @param yum_repo_commonurl Sets the url for the PostgreSQL common Yum repository. Useful if you host your own mirror of the YUM repository.
6164
#
62-
# @param needs_initdb Explicitly calls the initdb operation after the server package is installed and before the PostgreSQL service is started.
65+
# @param needs_initdb
66+
# Explicitly calls the initdb operation after the server package is installed and before the PostgreSQL service is started.
6367
#
6468
# @param encoding
6569
# Sets the default encoding for all databases created with this module.
66-
# On certain operating systems, this is also used during the template1 initialization, so it becomes a default outside of the module as well.
70+
# On certain operating systems, this is also used during the template1 initialization,
71+
# so it becomes a default outside of the module as well.
6772
# @param locale
6873
# Sets the default database locale for all databases created with this module.
69-
# On certain operating systems, this is also used during the template1 initialization, so it becomes a default outside of the module as well.
74+
# On certain operating systems, this is also used during the template1 initialization,
75+
# so it becomes a default outside of the module as well.
7076
# On Debian, you'll need to ensure that the 'locales-all' package is installed for full functionality of PostgreSQL.
7177
# @param data_checksums
7278
# Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent.
7379
# Warning: This option is used during initialization by initdb, and cannot be changed later.
7480
#
75-
# @param timezone Sets the default timezone of the postgresql server. The postgresql built-in default is taking the systems timezone information.
81+
# @param timezone
82+
# Sets the default timezone of the postgresql server. The postgresql built-in default is taking the systems timezone information.
7683
#
7784
# @param manage_pg_hba_conf Allow Puppet to manage the pg_hba.conf file.
7885
# @param manage_pg_ident_conf Allow Puppet to manage the pg_ident.conf file.
@@ -92,8 +99,9 @@
9299
# Manage the DNF module. This only makes sense on distributions that use DNF
93100
# package manager, such as EL8 or Fedora. It also requires Puppet 5.5.20+ or
94101
# Puppet 6.15.0+ since they ship the dnfmodule provider.
95-
# @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.
96-
#
102+
# @param module_workdir
103+
# Specifies working directory under which the psql command should be executed.
104+
# May need to specify if '/tmp' is on volume mounted with noexec option.
97105
#
98106
class postgresql::globals (
99107
Optional[String[1]] $client_package_name = undef,

Diff for: manifests/lib/devel.pp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# @summary This class installs postgresql development libraries.
1+
# @summary This class installs postgresql development libraries.
22
#
33
# @param package_name
44
# Override devel package name
55
# @param package_ensure
66
# Ensure the development libraries are installed
77
# @param link_pg_config
8-
# If the bin directory used by the PostgreSQL page is not /usr/bin or /usr/local/bin, symlinks pg_config from the package's bin dir into usr/bin (not applicable to Debian systems). Set to false to disable this behavior.
8+
# If the bin directory used by the PostgreSQL page is not /usr/bin or /usr/local/bin, symlinks pg_config from the package's bin dir
9+
# into usr/bin (not applicable to Debian systems). Set to false to disable this behavior.
910
#
1011
#
1112
class postgresql::lib::devel (

Diff for: manifests/lib/docs.pp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# @summary Installs PostgreSQL bindings for Postgres-Docs. Set the following parameters if you have a custom version you would like to install.
1+
# @summary
2+
# Installs PostgreSQL bindings for Postgres-Docs. Set the following parameters if you have a custom version you would like to install.
23
#
34
# @note
45
# Make sure to add any necessary yum or apt repositories if specifying a custom version.
@@ -7,7 +8,7 @@
78
# Specifies the name of the PostgreSQL docs package.
89
# @param package_ensure
910
# Whether the PostgreSQL docs package resource should be present.
10-
#
11+
#
1112
#
1213
class postgresql::lib::docs (
1314
String $package_name = $postgresql::params::docs_package_name,

Diff for: manifests/repo.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}
1919

2020
default: {
21-
fail("Unsupported managed repository for osfamily: ${facts['os']['family']}, operatingsystem: ${facts['os']['name']}, module ${module_name} currently only supports managing repos for osfamily RedHat and Debian")
21+
fail("Unsupported managed repository for osfamily: ${facts['os']['family']}, operatingsystem: ${facts['os']['name']}, module ${module_name} currently only supports managing repos for osfamily RedHat and Debian") # lint:ignore:140chars
2222
}
2323
}
2424
}

Diff for: manifests/server.pp

+35-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# @summary This installs a PostgreSQL server
22
#
3-
# @param postgres_password Sets the password for the postgres user to your specified value. By default, this setting uses the superuser account in the Postgres database, with a user called postgres and no password.
3+
# @param postgres_password
4+
# Sets the password for the postgres user to your specified value. By default, this setting uses the superuser account in the Postgres
5+
# database, with a user called postgres and no password.
46
# @param package_name Specifies the name of the package to use for installing the server software.
57
# @param package_ensure Passes a value through to the package resource when creating the server instance.
68
#
@@ -11,22 +13,33 @@
1113
# @param service_enable Enable the PostgreSQL service
1214
# @param service_manage Defines whether or not Puppet should manage the service.
1315
# @param service_name Overrides the default PostgreSQL service name.
14-
# @param service_restart_on_change Overrides the default behavior to restart your PostgreSQL service when a config entry has been changed that requires a service restart to become active.
16+
# @param service_restart_on_change
17+
# Overrides the default behavior to restart your PostgreSQL service when a config entry has been changed that requires a service restart
18+
# to become active.
1519
# @param service_provider Overrides the default PostgreSQL service provider.
1620
# @param service_reload Overrides the default reload command for your PostgreSQL service.
1721
# @param service_status Overrides the default status check command for your PostgreSQL service.
1822
# @param default_database Specifies the name of the default database to connect with. On most systems this is 'postgres'.
19-
# @param default_connect_settings Specifies a hash of environment variables used when connecting to a remote server. Becomes the default for other defined types, such as postgresql::server::role.
23+
# @param default_connect_settings
24+
# Specifies a hash of environment variables used when connecting to a remote server. Becomes the default for other defined types, such as
25+
# postgresql::server::role.
2026
#
2127
# @param listen_addresses Address list on which the PostgreSQL service will listen
22-
# @param port Specifies the port for the PostgreSQL server to listen on. Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems, changing the port causes the server to come to a full stop before being able to make the change.
28+
# @param port
29+
# Specifies the port for the PostgreSQL server to listen on.
30+
# Note: The same port number is used for all IP addresses the server listens on.
31+
# Also, for Red Hat systems and early Debian systems, changing the port causes the server to come to a full stop before being able to make
32+
# the change.
2333
# Default value: 5432. Meaning the Postgres server listens on TCP port 5432.
2434
#
2535
# @param ip_mask_deny_postgres_user Specifies the IP mask from which remote connections should be denied for the postgres superuser.
2636
# Default value: '0.0.0.0/0', which denies any remote connection.
2737
#
28-
# @param ip_mask_allow_all_users Overrides PostgreSQL defaults for remote connections. By default, PostgreSQL does not allow database user accounts to connect via TCP from remote machines. If you'd like to allow this, you can override this setting.
29-
# Set to '0.0.0.0/0' to allow database users to connect from any remote machine, or '192.168.0.0/1' to allow connections from any machine on your local '192.168' subnet.
38+
# @param ip_mask_allow_all_users
39+
# Overrides PostgreSQL defaults for remote connections. By default, PostgreSQL does not allow database user accounts to connect via TCP
40+
# from remote machines. If you'd like to allow this, you can override this setting.
41+
# Set to '0.0.0.0/0' to allow database users to connect from any remote machine, or '192.168.0.0/1' to allow connections from any machine
42+
# on your local '192.168' subnet.
3043
# Default value: '127.0.0.1/32'.
3144
#
3245
# @param ipv4acls Lists strings for access control for connection method, users, databases, IPv4 addresses;
@@ -47,17 +60,26 @@
4760
#
4861
# @param log_line_prefix PostgreSQL log line prefix
4962
#
50-
# @param pg_hba_conf_defaults If false, disables the defaults supplied with the module for pg_hba.conf. This is useful if you disagree with the defaults and wish to override them yourself. Be sure that your changes of course align with the rest of the module, as some access is required to perform basic psql operations for example.
63+
# @param pg_hba_conf_defaults
64+
# If false, disables the defaults supplied with the module for pg_hba.conf. This is useful if you disagree with the defaults and wish to
65+
# override them yourself. Be sure that your changes of course align with the rest of the module, as some access is required to perform
66+
# basic psql operations for example.
5167
#
5268
# @param user Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
5369
# @param group Overrides the default postgres user group to be used for related files in the file system.
5470
#
5571
# @param needs_initdb Explicitly calls the initdb operation after server package is installed, and before the PostgreSQL service is started.
5672
#
57-
# @param encoding Sets the default encoding for all databases created with this module. On certain operating systems this is also used during the template1 initialization, so it becomes a default outside of the module as well.
58-
# @param locale Sets the default database locale for all databases created with this module. On certain operating systems this is used during the template1 initialization as well, so it becomes a default outside of the module.
59-
# @param data_checksums Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent.
60-
# Warning: This option is used during initialization by initdb, and cannot be changed later. If set, checksums are calculated for all objects, in all databases.
73+
# @param encoding
74+
# Sets the default encoding for all databases created with this module. On certain operating systems this is also used during the
75+
# template1 initialization, so it becomes a default outside of the module as well.
76+
# @param locale
77+
# Sets the default database locale for all databases created with this module. On certain operating systems this is used during the
78+
# template1 initialization as well, so it becomes a default outside of the module.
79+
# @param data_checksums
80+
# Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent.
81+
# Warning: This option is used during initialization by initdb, and cannot be changed later.
82+
# If set, checksums are calculated for all objects, in all databases.
6183
#
6284
# @param timezone Set timezone for the PostgreSQL instance
6385
#
@@ -86,7 +108,8 @@
86108
#
87109
# @param version Deprecated. Use postgresql::globals instead. Sets PostgreSQL version
88110
#
89-
# @param extra_systemd_config Adds extra config to systemd config file, can for instance be used to add extra openfiles. This can be a multi line string
111+
# @param extra_systemd_config
112+
# Adds extra config to systemd config file, can for instance be used to add extra openfiles. This can be a multi line string
90113
# @param auth_host auth method used by default for host authorization
91114
# @param auth_local auth method used by default for local authorization
92115
# @param lc_messages locale used for logging and system messages
@@ -172,7 +195,6 @@
172195

173196
#Deprecated
174197
Optional[String[1]] $version = undef,
175-
176198
) inherits postgresql::params {
177199
if $version != undef {
178200
warning('Passing "version" to postgresql::server is deprecated; please use postgresql::globals instead.')

Diff for: manifests/server/database.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
}
109109
Postgresql_psql["CREATE DATABASE \"${dbname}\""]
110110
-> postgresql_psql { "COMMENT ON DATABASE \"${dbname}\" IS '${comment}'":
111-
unless => "SELECT 1 FROM pg_catalog.pg_database d WHERE datname = '${dbname}' AND pg_catalog.${comment_information_function}(d.oid, 'pg_database') = '${comment}'",
111+
unless => "SELECT 1 FROM pg_catalog.pg_database d WHERE datname = '${dbname}' AND pg_catalog.${comment_information_function}(d.oid, 'pg_database') = '${comment}'", # lint:ignore:140chars
112112
db => $dbname,
113113
}
114114
}
@@ -126,7 +126,7 @@
126126

127127
if $tablespace {
128128
postgresql_psql { "ALTER DATABASE \"${dbname}\" SET ${tablespace_option}":
129-
unless => "SELECT 1 FROM pg_database JOIN pg_tablespace spc ON dattablespace = spc.oid WHERE datname = '${dbname}' AND spcname = '${tablespace}'",
129+
unless => "SELECT 1 FROM pg_database JOIN pg_tablespace spc ON dattablespace = spc.oid WHERE datname = '${dbname}' AND spcname = '${tablespace}'", # lint:ignore:140chars
130130
require => Postgresql_psql["CREATE DATABASE \"${dbname}\""],
131131
}
132132

Diff for: manifests/server/default_privileges.pp

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/(?i:^SEQUENCES$)/,
2424
/(?i:^TABLES$)/,
2525
/(?i:^TYPES$)/,
26-
/(?i:^SCHEMAS$)/ # lint:ignore:trailing_comma
26+
/(?i:^SCHEMAS$)/
2727
] $object_type,
2828
String $schema = 'public',
2929
String $psql_db = $postgresql::server::default_database,
@@ -159,8 +159,8 @@
159159
}
160160

161161
$_unless = $ensure ? {
162-
'absent' => "SELECT 1 WHERE NOT EXISTS (SELECT * FROM pg_default_acl AS da LEFT JOIN pg_namespace AS n ON da.defaclnamespace = n.oid WHERE '%s=%s%s' = ANY (defaclacl)%s and defaclobjtype = '%s')",
163-
default => "SELECT 1 WHERE EXISTS (SELECT * FROM pg_default_acl AS da LEFT JOIN pg_namespace AS n ON da.defaclnamespace = n.oid WHERE '%s=%s%s' = ANY (defaclacl)%s and defaclobjtype = '%s')"
162+
'absent' => "SELECT 1 WHERE NOT EXISTS (SELECT * FROM pg_default_acl AS da LEFT JOIN pg_namespace AS n ON da.defaclnamespace = n.oid WHERE '%s=%s%s' = ANY (defaclacl)%s and defaclobjtype = '%s')", # lint:ignore:140chars
163+
default => "SELECT 1 WHERE EXISTS (SELECT * FROM pg_default_acl AS da LEFT JOIN pg_namespace AS n ON da.defaclnamespace = n.oid WHERE '%s=%s%s' = ANY (defaclacl)%s and defaclobjtype = '%s')", # lint:ignore:140chars
164164
}
165165

166166
$unless_cmd = sprintf($_unless, $role, $_check_privilege, $_check_target_role, $_check_schema, $_check_type)

0 commit comments

Comments
 (0)