Skip to content

Commit ae56cc9

Browse files
committed
(GH-cat-9) Update code to match syntax standard, part 2
Code now compliant with the following rules: - parameter_documentation - parameter_types
1 parent 08f7a48 commit ae56cc9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1075
-895
lines changed

.puppet-lint.rc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
--relative
2-
--no-parameter_types-check
3-
--no-parameter_documentation-check
42
--no-anchor_resource-check

.sync.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,4 @@ Rakefile:
3737
changelog_since_tag: "3.2.0"
3838
Rakefile:
3939
extra_disabled_lint_checks:
40-
- parameter_types
41-
- parameter_documentation
4240
- anchor_resource

Rakefile

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

4444
PuppetLint.configuration.send('disable_relative')
45-
PuppetLint.configuration.send('disable_parameter_types')
46-
PuppetLint.configuration.send('disable_parameter_documentation')
4745
PuppetLint.configuration.send('disable_anchor_resource')
4846

4947

manifests/balancer.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
# apache::balancer { 'puppet00': }
4444
#
4545
define apache::balancer (
46-
$proxy_set = {},
47-
$collect_exported = true,
48-
$target = undef,
49-
$options = [],
46+
Hash $proxy_set = {},
47+
Boolean $collect_exported = true,
48+
Optional[String] $target = undef,
49+
Array $options = [],
5050
) {
5151
include apache::mod::proxy_balancer
5252

manifests/balancermember.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# @param url
2828
# The url used to contact the balancer member server.
2929
#
30-
# @param options
30+
# @param options
3131
# Specifies an array of [options](https://httpd.apache.org/docs/current/mod/mod_proxy.html#balancermember)
3232
# after the URL, and accepts any key-value pairs available to `ProxyPass`.
3333
#
@@ -39,9 +39,9 @@
3939
# }
4040
#
4141
define apache::balancermember (
42-
$balancer_cluster,
43-
$url = "http://${$facts['networking']['fqdn']}/",
44-
$options = [],
42+
String $balancer_cluster,
43+
String $url = "http://${$facts['networking']['fqdn']}/",
44+
Array $options = [],
4545
) {
4646
concat::fragment { "BalancerMember ${name}":
4747
target => "apache_balancer_${balancer_cluster}",

manifests/custom_config.pp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@
5050
#
5151
define apache::custom_config (
5252
Enum['absent', 'present'] $ensure = 'present',
53-
$confdir = $apache::confd_dir,
54-
$content = undef,
55-
$priority = '25',
56-
$source = undef,
57-
$verify_command = $apache::params::verify_command,
53+
String $confdir = $apache::confd_dir,
54+
Optional[String] $content = undef,
55+
Variant[String,Boolean] $priority = '25',
56+
Optional[String] $source = undef,
57+
String $verify_command = $apache::params::verify_command,
5858
Boolean $verify_config = true,
59-
$filename = undef,
60-
$owner = undef,
61-
$group = undef,
62-
$file_mode = undef,
59+
Optional[String] $filename = undef,
60+
Optional[String] $owner = undef,
61+
Optional[String] $group = undef,
62+
Optional[String] $file_mode = undef,
6363
Boolean $show_diff = true,
6464
) {
6565
if $content and $source {

manifests/default_confd_files.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# @api private
55
class apache::default_confd_files (
6-
$all = true,
6+
Boolean $all = true,
77
) {
88
# The rest of the conf.d/* files only get loaded if we want them
99
if $all {

manifests/default_mods.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
#
44
# @api private
55
class apache::default_mods (
6-
$all = true,
7-
$mods = undef,
8-
$apache_version = $apache::apache_version,
9-
$use_systemd = $apache::use_systemd,
6+
Boolean $all = true,
7+
Optional[Variant[Array[String],String]] $mods = undef,
8+
String $apache_version = $apache::apache_version,
9+
Boolean $use_systemd = $apache::use_systemd,
1010
) {
1111
# These are modules required to run the default configuration.
1212
# They are not configurable at this time, so we just include

manifests/default_mods/load.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Helper used by `apache::default_mods`
33
#
44
# @api private
5-
define apache::default_mods::load ($module = $title) {
5+
define apache::default_mods::load (String $module = $title) {
66
if defined("apache::mod::${module}") {
77
include "::apache::mod::${module}"
88
} else {

manifests/fastcgi/server.pp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@
2828
# @param file_type
2929
# Sets the MIME `content-type` of the file to be processed by the FastCGI server.
3030
#
31+
# @param pass_header
32+
# Sets a header for the server
33+
#
3134
define apache::fastcgi::server (
32-
$host = '127.0.0.1:9000',
33-
$timeout = 15,
34-
$flush = false,
35-
$faux_path = "/var/www/${name}.fcgi",
36-
$fcgi_alias = "/${name}.fcgi",
37-
$file_type = 'application/x-httpd-php',
38-
$pass_header = undef,
35+
String $host = '127.0.0.1:9000',
36+
Integer $timeout = 15,
37+
Boolean $flush = false,
38+
String $faux_path = "/var/www/${name}.fcgi",
39+
String $fcgi_alias = "/${name}.fcgi",
40+
String $file_type = 'application/x-httpd-php',
41+
Optional[String] $pass_header = undef,
3942
) {
4043
include apache::mod::fastcgi
4144

manifests/init.pp

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -461,92 +461,92 @@
461461
# Specifies any idditional Internet media (mime) types that you wish to be configured.
462462
#
463463
class apache (
464-
$apache_name = $apache::params::apache_name,
465-
$service_name = $apache::params::service_name,
466-
$default_mods = true,
464+
String $apache_name = $apache::params::apache_name,
465+
String $service_name = $apache::params::service_name,
466+
Variant[Array,Boolean] $default_mods = true,
467467
Boolean $default_vhost = true,
468-
$default_charset = undef,
468+
Optional[String] $default_charset = undef,
469469
Boolean $default_confd_files = true,
470470
Boolean $default_ssl_vhost = false,
471-
$default_ssl_cert = $apache::params::default_ssl_cert,
472-
$default_ssl_key = $apache::params::default_ssl_key,
473-
$default_ssl_chain = undef,
474-
$default_ssl_ca = undef,
475-
$default_ssl_crl_path = undef,
476-
$default_ssl_crl = undef,
477-
$default_ssl_crl_check = undef,
471+
String $default_ssl_cert = $apache::params::default_ssl_cert,
472+
String $default_ssl_key = $apache::params::default_ssl_key,
473+
Optional[String] $default_ssl_chain = undef,
474+
Optional[String] $default_ssl_ca = undef,
475+
Optional[String] $default_ssl_crl_path = undef,
476+
Optional[String] $default_ssl_crl = undef,
477+
Optional[String] $default_ssl_crl_check = undef,
478478
Boolean $default_ssl_reload_on_change = false,
479-
$default_type = 'none',
480-
$dev_packages = $apache::params::dev_packages,
481-
$ip = undef,
479+
String $default_type = 'none',
480+
Optional[Variant[Array,String]] $dev_packages = $apache::params::dev_packages,
481+
Optional[String] $ip = undef,
482482
Boolean $service_enable = true,
483483
Boolean $service_manage = true,
484-
$service_ensure = 'running',
485-
$service_restart = undef,
486-
$purge_configs = true,
487-
$purge_vhost_dir = undef,
488-
$purge_vdir = false,
489-
$serveradmin = 'root@localhost',
484+
Variant[Boolean,String] $service_ensure = 'running',
485+
Optional[String] $service_restart = undef,
486+
Boolean $purge_configs = true,
487+
Optional[Boolean] $purge_vhost_dir = undef,
488+
Boolean $purge_vdir = false,
489+
String $serveradmin = 'root@localhost',
490490
Enum['On', 'Off', 'on', 'off'] $sendfile = 'On',
491-
$ldap_verify_server_cert = undef,
492-
$ldap_trusted_mode = undef,
493-
$error_documents = false,
494-
$timeout = '60',
495-
$httpd_dir = $apache::params::httpd_dir,
496-
$server_root = $apache::params::server_root,
497-
$conf_dir = $apache::params::conf_dir,
498-
$confd_dir = $apache::params::confd_dir,
491+
Optional[Enum['On', 'Off', 'on', 'off']] $ldap_verify_server_cert = undef,
492+
Optional[String] $ldap_trusted_mode = undef,
493+
Boolean $error_documents = false,
494+
String $timeout = '60',
495+
String $httpd_dir = $apache::params::httpd_dir,
496+
String $server_root = $apache::params::server_root,
497+
String $conf_dir = $apache::params::conf_dir,
498+
String $confd_dir = $apache::params::confd_dir,
499499
Enum['Off', 'On', 'Double', 'off', 'on', 'double'] $hostname_lookups = $apache::params::hostname_lookups,
500-
$conf_enabled = $apache::params::conf_enabled,
501-
$vhost_dir = $apache::params::vhost_dir,
502-
$vhost_enable_dir = $apache::params::vhost_enable_dir,
503-
$mod_libs = $apache::params::mod_libs,
504-
$mod_packages = $apache::params::mod_packages,
505-
$vhost_include_pattern = $apache::params::vhost_include_pattern,
506-
$mod_dir = $apache::params::mod_dir,
507-
$mod_enable_dir = $apache::params::mod_enable_dir,
508-
$mpm_module = $apache::params::mpm_module,
509-
$lib_path = $apache::params::lib_path,
510-
$conf_template = $apache::params::conf_template,
511-
$servername = $apache::params::servername,
512-
$pidfile = $apache::params::pidfile,
500+
Optional[String] $conf_enabled = $apache::params::conf_enabled,
501+
String $vhost_dir = $apache::params::vhost_dir,
502+
Optional[String] $vhost_enable_dir = $apache::params::vhost_enable_dir,
503+
Hash $mod_libs = $apache::params::mod_libs,
504+
Hash $mod_packages = $apache::params::mod_packages,
505+
String $vhost_include_pattern = $apache::params::vhost_include_pattern,
506+
String $mod_dir = $apache::params::mod_dir,
507+
Optional[String] $mod_enable_dir = $apache::params::mod_enable_dir,
508+
Variant[Boolean,String] $mpm_module = $apache::params::mpm_module,
509+
String $lib_path = $apache::params::lib_path,
510+
String $conf_template = $apache::params::conf_template,
511+
Optional[String] $servername = $apache::params::servername,
512+
String $pidfile = $apache::params::pidfile,
513513
Optional[Stdlib::Absolutepath] $rewrite_lock = undef,
514514
Boolean $manage_user = true,
515515
Boolean $manage_group = true,
516-
$user = $apache::params::user,
517-
$group = $apache::params::group,
518-
$http_protocol_options = $apache::params::http_protocol_options,
519-
$supplementary_groups = [],
520-
$keepalive = $apache::params::keepalive,
521-
$keepalive_timeout = $apache::params::keepalive_timeout,
522-
$max_keepalive_requests = $apache::params::max_keepalive_requests,
523-
$limitreqfieldsize = '8190',
524-
$limitreqfields = '100',
525-
$logroot = $apache::params::logroot,
526-
$logroot_mode = $apache::params::logroot_mode,
516+
String $user = $apache::params::user,
517+
String $group = $apache::params::group,
518+
Optional[String] $http_protocol_options = $apache::params::http_protocol_options,
519+
Array $supplementary_groups = [],
520+
String $keepalive = $apache::params::keepalive,
521+
Variant[Integer,String] $keepalive_timeout = $apache::params::keepalive_timeout,
522+
Variant[Integer,String] $max_keepalive_requests = $apache::params::max_keepalive_requests,
523+
String $limitreqfieldsize = '8190',
524+
String $limitreqfields = '100',
525+
String $logroot = $apache::params::logroot,
526+
Optional[String] $logroot_mode = $apache::params::logroot_mode,
527527
Apache::LogLevel $log_level = $apache::params::log_level,
528-
$log_formats = {},
529-
$ssl_file = undef,
530-
$ports_file = $apache::params::ports_file,
531-
$docroot = $apache::params::docroot,
532-
$apache_version = $apache::version::default,
533-
$server_tokens = 'Prod',
534-
$server_signature = 'On',
535-
$trace_enable = 'On',
528+
Hash $log_formats = {},
529+
Optional[String] $ssl_file = undef,
530+
String $ports_file = $apache::params::ports_file,
531+
String $docroot = $apache::params::docroot,
532+
String $apache_version = $apache::version::default,
533+
String $server_tokens = 'Prod',
534+
String $server_signature = 'On',
535+
String $trace_enable = 'On',
536536
Optional[Enum['on', 'off', 'nodecode']] $allow_encoded_slashes = undef,
537-
$file_e_tag = undef,
537+
Optional[String] $file_e_tag = undef,
538538
Optional[Enum['On', 'on', 'Off', 'off', 'DNS', 'dns']]
539-
$use_canonical_name = undef,
540-
$package_ensure = 'installed',
541-
Boolean $use_optional_includes = $apache::params::use_optional_includes,
542-
$use_systemd = $apache::params::use_systemd,
543-
$mime_types_additional = $apache::params::mime_types_additional,
544-
$file_mode = $apache::params::file_mode,
545-
$root_directory_options = $apache::params::root_directory_options,
546-
Boolean $root_directory_secured = false,
547-
$error_log = $apache::params::error_log,
548-
$scriptalias = $apache::params::scriptalias,
549-
$access_log_file = $apache::params::access_log_file,
539+
$use_canonical_name = undef,
540+
String $package_ensure = 'installed',
541+
Boolean $use_optional_includes = $apache::params::use_optional_includes,
542+
Boolean $use_systemd = $apache::params::use_systemd,
543+
Hash $mime_types_additional = $apache::params::mime_types_additional,
544+
String $file_mode = $apache::params::file_mode,
545+
Array $root_directory_options = $apache::params::root_directory_options,
546+
Boolean $root_directory_secured = false,
547+
String $error_log = $apache::params::error_log,
548+
String $scriptalias = $apache::params::scriptalias,
549+
String $access_log_file = $apache::params::access_log_file,
550550
Array[Enum['h2', 'h2c', 'http/1.1']] $protocols = [],
551551
Optional[Boolean] $protocols_honor_order = undef,
552552
) inherits apache::params {

0 commit comments

Comments
 (0)