Skip to content

Commit 5ae2e79

Browse files
committed
Parameter documentation rule
1 parent a1ed664 commit 5ae2e79

File tree

10 files changed

+87
-86
lines changed

10 files changed

+87
-86
lines changed

.puppet-lint.rc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
--relative
2-
--no-parameter_documentation-check
32
--no-anchor_resource-check
43
--no-params_empty_string_assignment-check

.sync.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,5 @@ spec/spec_helper.rb:
6363
delete: true
6464
Rakefile:
6565
extra_disabled_lint_checks:
66-
- parameter_documentation
6766
- anchor_resource
6867
- params_empty_string_assignment

Rakefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ def changelog_future_release
4242
end
4343

4444
PuppetLint.configuration.send('disable_relative')
45-
PuppetLint.configuration.send('disable_parameter_documentation')
4645
PuppetLint.configuration.send('disable_anchor_resource')
4746
PuppetLint.configuration.send('disable_params_empty_string_assignment')
4847

49-
5048
if Bundler.rubygems.find_name('github_changelog_generator').any?
5149
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
5250
raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?

manifests/backup/pg_dump.pp

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
# Manage creation of the backup user.
2828
# @param optional_args
2929
# 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.
30-
# @param postscript
30+
# @param post_script
3131
# One or more scripts that are executed when the backup is finished. This could be used to sync the backup to a central store.
32-
# @param prescript
32+
# @param pre_script
3333
# One or more scripts that are executed before the backup begins.
3434
# @param rotate
3535
# Backup rotation interval in 24 hour periods.
@@ -41,30 +41,30 @@
4141
# Weekdays on which the backup job should run. Defaults to `*`. This parameter is passed directly to the cron resource.
4242
#
4343
class postgresql::backup::pg_dump (
44-
String[1] $dir,
45-
Boolean $compress = true,
46-
Array $databases = [],
47-
Boolean $delete_before_dump = false,
48-
String[1] $dir_group = '0',
49-
String[1] $dir_mode = '0700',
50-
String[1] $dir_owner = 'root',
51-
Enum['present','absent'] $ensure = 'present',
52-
Enum['plain','custom','directory','tar'] $format = 'plain',
53-
Boolean $install_cron = true,
54-
Boolean $manage_user = false,
55-
Array $optional_args = [],
56-
Stdlib::Absolutepath $pgpass_path = '/root/.pgpass',
57-
Integer $rotate = 30,
58-
Stdlib::Absolutepath $script_path = '/usr/local/sbin/pg_dump.sh',
59-
Stdlib::Absolutepath $success_file_path = '/tmp/pgbackup_success',
60-
String[1] $template = 'postgresql/pg_dump.sh.epp',
61-
Array $time = ['23', '5'],
62-
String[1] $weekday = '*',
63-
Optional[Variant[String, Sensitive[String]]] $db_password = undef,
64-
Optional[String[1]] $db_user = undef,
65-
Optional[String[1]] $package_name = undef,
66-
Optional[String[1]] $post_script = undef,
67-
Optional[String[1]] $pre_script = undef,
44+
String[1] $dir,
45+
Boolean $compress = true,
46+
Array $databases = [],
47+
Boolean $delete_before_dump = false,
48+
String[1] $dir_group = '0',
49+
String[1] $dir_mode = '0700',
50+
String[1] $dir_owner = 'root',
51+
Enum['present','absent'] $ensure = 'present',
52+
Enum['plain','custom','directory','tar'] $format = 'plain',
53+
Boolean $install_cron = true,
54+
Boolean $manage_user = false,
55+
Array $optional_args = [],
56+
Stdlib::Absolutepath $pgpass_path = '/root/.pgpass',
57+
Integer $rotate = 30,
58+
Stdlib::Absolutepath $script_path = '/usr/local/sbin/pg_dump.sh',
59+
Stdlib::Absolutepath $success_file_path = '/tmp/pgbackup_success',
60+
String[1] $template = 'postgresql/pg_dump.sh.epp',
61+
Array $time = ['23', '5'],
62+
String[1] $weekday = '*',
63+
Optional[Variant[String, Sensitive[String]]] $db_password = undef,
64+
Optional[String[1]] $db_user = undef,
65+
Optional[String[1]] $package_name = undef,
66+
Optional[String[1]] $post_script = undef,
67+
Optional[String[1]] $pre_script = undef,
6868
) {
6969
# Install required packages
7070
if $package_name {

manifests/globals.pp

Lines changed: 54 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
# Whether to manage the postgresql conf file permissions. This means owner,
8282
# group and mode. Contents are not managed but should be managed through
8383
# postgresql::server::config_entry.
84+
# @param manage_selinux Allows Puppet to manage the appropriate configuration file for selinux.
8485
#
8586
# @param manage_datadir Set to false if you have file{ $datadir: } already defined
8687
# @param manage_logdir Set to false if you have file{ $logdir: } already defined
@@ -95,72 +96,72 @@
9596
#
9697
#
9798
class postgresql::globals (
98-
Optional[String[1]] $client_package_name = undef,
99-
Optional[String[1]] $server_package_name = undef,
100-
Optional[String[1]] $contrib_package_name = undef,
101-
Optional[String[1]] $devel_package_name = undef,
102-
Optional[String[1]] $java_package_name = undef,
103-
Optional[String[1]] $docs_package_name = undef,
104-
Optional[String[1]] $perl_package_name = undef,
105-
Optional[String[1]] $plperl_package_name = undef,
106-
Optional[String[1]] $plpython_package_name = undef,
107-
Optional[String[1]] $python_package_name = undef,
108-
Optional[String[1]] $postgis_package_name = undef,
99+
Optional[String[1]] $client_package_name = undef,
100+
Optional[String[1]] $server_package_name = undef,
101+
Optional[String[1]] $contrib_package_name = undef,
102+
Optional[String[1]] $devel_package_name = undef,
103+
Optional[String[1]] $java_package_name = undef,
104+
Optional[String[1]] $docs_package_name = undef,
105+
Optional[String[1]] $perl_package_name = undef,
106+
Optional[String[1]] $plperl_package_name = undef,
107+
Optional[String[1]] $plpython_package_name = undef,
108+
Optional[String[1]] $python_package_name = undef,
109+
Optional[String[1]] $postgis_package_name = undef,
109110

110-
Optional[String[1]] $service_name = undef,
111-
Optional[String[1]] $service_provider = undef,
112-
Optional[String[1]] $service_status = undef,
113-
Optional[String[1]] $default_database = undef,
111+
Optional[String[1]] $service_name = undef,
112+
Optional[String[1]] $service_provider = undef,
113+
Optional[String[1]] $service_status = undef,
114+
Optional[String[1]] $default_database = undef,
114115

115-
Optional[String[1]] $validcon_script_path = undef,
116+
Optional[String[1]] $validcon_script_path = undef,
116117

117-
Optional[String[1]] $initdb_path = undef,
118-
Optional[String[1]] $createdb_path = undef,
119-
Optional[String[1]] $psql_path = undef,
120-
Optional[String[1]] $pg_hba_conf_path = undef,
121-
Optional[String[1]] $pg_ident_conf_path = undef,
122-
Optional[String[1]] $postgresql_conf_path = undef,
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,
123124
Optional[Stdlib::Filemode] $postgresql_conf_mode = undef,
124-
Optional[String[1]] $recovery_conf_path = undef,
125-
Hash $default_connect_settings = {},
125+
Optional[String[1]] $recovery_conf_path = undef,
126+
Hash $default_connect_settings = {},
126127

127-
Optional[Boolean] $pg_hba_conf_defaults = undef,
128+
Optional[Boolean] $pg_hba_conf_defaults = undef,
128129

129-
Optional[String[1]] $datadir = undef,
130-
Optional[String[1]] $confdir = undef,
131-
Optional[String[1]] $bindir = undef,
132-
Optional[String[1]] $xlogdir = undef,
133-
Optional[String[1]] $logdir = undef,
134-
Optional[String[1]] $log_line_prefix = undef,
135-
Optional[Boolean] $manage_datadir = undef,
136-
Optional[Boolean] $manage_logdir = undef,
137-
Optional[Boolean] $manage_xlogdir = undef,
130+
Optional[String[1]] $datadir = undef,
131+
Optional[String[1]] $confdir = undef,
132+
Optional[String[1]] $bindir = undef,
133+
Optional[String[1]] $xlogdir = undef,
134+
Optional[String[1]] $logdir = undef,
135+
Optional[String[1]] $log_line_prefix = undef,
136+
Optional[Boolean] $manage_datadir = undef,
137+
Optional[Boolean] $manage_logdir = undef,
138+
Optional[Boolean] $manage_xlogdir = undef,
138139

139-
Optional[String[1]] $user = undef,
140-
Optional[String[1]] $group = undef,
140+
Optional[String[1]] $user = undef,
141+
Optional[String[1]] $group = undef,
141142

142-
Optional[String[1]] $version = undef,
143-
Optional[String[1]] $postgis_version = undef,
144-
Optional[String[1]] $repo_proxy = undef,
145-
Optional[String[1]] $repo_baseurl = undef,
146-
Optional[String[1]] $yum_repo_commonurl = undef,
143+
Optional[String[1]] $version = undef,
144+
Optional[String[1]] $postgis_version = undef,
145+
Optional[String[1]] $repo_proxy = undef,
146+
Optional[String[1]] $repo_baseurl = undef,
147+
Optional[String[1]] $yum_repo_commonurl = undef,
147148

148-
Optional[Boolean] $needs_initdb = undef,
149+
Optional[Boolean] $needs_initdb = undef,
149150

150-
Optional[String[1]] $encoding = undef,
151-
Optional[String[1]] $locale = undef,
152-
Optional[String[1]] $data_checksums = undef,
153-
Optional[String[1]] $timezone = undef,
151+
Optional[String[1]] $encoding = undef,
152+
Optional[String[1]] $locale = undef,
153+
Optional[String[1]] $data_checksums = undef,
154+
Optional[String[1]] $timezone = undef,
154155

155-
Optional[Boolean] $manage_pg_hba_conf = undef,
156-
Optional[Boolean] $manage_pg_ident_conf = undef,
157-
Optional[Boolean] $manage_recovery_conf = undef,
158-
Optional[Boolean] $manage_postgresql_conf_perms = undef,
159-
Optional[Boolean] $manage_selinux = undef,
156+
Optional[Boolean] $manage_pg_hba_conf = undef,
157+
Optional[Boolean] $manage_pg_ident_conf = undef,
158+
Optional[Boolean] $manage_recovery_conf = undef,
159+
Optional[Boolean] $manage_postgresql_conf_perms = undef,
160+
Optional[Boolean] $manage_selinux = undef,
160161

161-
Optional[Boolean] $manage_package_repo = undef,
162+
Optional[Boolean] $manage_package_repo = undef,
162163
Boolean $manage_dnf_module = false,
163-
Optional[String[1]] $module_workdir = undef,
164+
Optional[String[1]] $module_workdir = undef,
164165
) {
165166
# We are determining this here, because it is needed by the package repo
166167
# class.

manifests/server.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@
6868
# Whether to manage the postgresql conf file permissions. This means owner,
6969
# group and mode. Contents are not managed but should be managed through
7070
# postgresql::server::config_entry.
71+
# @param manage_selinux Specifies whether or not manage the conf file for selinux.
7172
# @param module_workdir Working directory for the PostgreSQL module
7273
#
7374
# @param manage_datadir Set to false if you have file{ $datadir: } already defined
7475
# @param manage_logdir Set to false if you have file{ $logdir: } already defined
7576
# @param manage_xlogdir Set to false if you have file{ $xlogdir: } already defined
77+
# @param password_encryption Specify the type of encryption set for the password.
7678
#
7779
# @param roles Specifies a hash from which to generate postgresql::server::role resources.
7880
# @param config_entries Specifies a hash from which to generate postgresql::server::config_entry resources.

manifests/server/default_privileges.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# @param psql_path Specifies the OS user for running psql. Default value: The default user for the module, usually 'postgres'.
1313
# @param port Specifies the port to access the server. Default value: The default user for the module, usually '5432'.
1414
# @param connect_settings Specifies a hash of environment variables used when connecting to a remote server.
15-
# @param psql_path Specifies the path to the psql command.
15+
# @param group Specifies the user group to which the privileges will be granted.
1616
define postgresql::server::default_privileges (
1717
String $role,
1818
String $db,

manifests/server/grant.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# @param privilege Specifies the privilege to grant. Valid options: 'ALL', 'ALL PRIVILEGES' or 'object_type' dependent string.
66
# @param object_type Specifies the type of object to which you are granting privileges. Valid options: 'DATABASE', 'SCHEMA', 'SEQUENCE', 'ALL SEQUENCES IN SCHEMA', 'TABLE' or 'ALL TABLES IN SCHEMA'.
77
# @param object_name Specifies name of object_type to which to grant access, can be either a string or a two element array. String: 'object_name' Array: ['schema_name', 'object_name']
8+
# @param object_arguments Specifies any arguments to be passed alongisde the access grant.
89
# @param psql_db Specifies the database to execute the grant against. This should not ordinarily be changed from the default
910
# @param psql_user Sets the OS user to run psql.
1011
# @param port Port to use when connecting.

manifests/server/instance/config.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# @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.
1818
# @param user Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
1919
# @param group Overrides the default postgres user group to be used for related files in the file system.
20-
# @param version, Sets PostgreSQL version
20+
# @param version Sets PostgreSQL version
2121
# @param manage_pg_hba_conf Boolean. Whether to manage the pg_hba.conf.
2222
# @param manage_pg_ident_conf Boolean. Overwrites the pg_ident.conf file.
2323
# @param manage_recovery_conf Boolean. Specifies whether or not manage the recovery.conf.
@@ -31,6 +31,7 @@
3131
# @param service_enable Enable the PostgreSQL service
3232
# @param log_line_prefix PostgreSQL log line prefix
3333
# @param timezone Set timezone for the PostgreSQL instance
34+
# @param password_encryption Specify the type of encryption set for the password.
3435
# @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
3536
# lint:endignore:140chars
3637
define postgresql::server::instance::config (

manifests/server/instance/service.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Default value: 5432. Meaning the Postgres server listens on TCP port 5432.
1111
# @param default_database Specifies the name of the default database to connect with. On most systems this is 'postgres'.
1212
# @param psql_path Specifies the path to the psql command.
13-
# @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.
13+
# @param 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.
1414
# lint:endignore:140chars
1515
define postgresql::server::instance::service (
1616
Variant[Enum['running', 'stopped'], Boolean] $service_ensure = $postgresql::server::service_ensure,

0 commit comments

Comments
 (0)