Skip to content

Commit ad646c9

Browse files
authored
Merge pull request #2235 from david22swan/GH-cat-9/syntax_standards
(GH-cat-9) Update module to match current syntax standard
2 parents 3619b33 + a1c95aa commit ad646c9

Some content is hidden

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

85 files changed

+1331
-1102
lines changed

.devcontainer/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/pupp
1313

1414
// Set *default* container specific settings.json values on container create.
1515
"settings": {
16-
"terminal.integrated.shell.linux": "/bin/bash"
16+
"terminal.integrated.profiles.linux": {
17+
"bash": {
18+
"path": "bash",
19+
}
20+
}
1721
},
1822

1923
// Add the IDs of extensions you want installed when the container is created.
2024
"extensions": [
2125
"puppet.puppet-vscode",
2226
"rebornix.Ruby"
23-
]
27+
],
2428

2529
// Use 'forwardPorts' to make a list of ports inside the container available locally.
2630
"forwardPorts": [],

.puppet-lint.rc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
11
--relative
2-
--no-parameter_types-check
3-
--no-parameter_documentation-check
4-
--no-top_scope_facts-check
5-
--no-legacy_facts-check
6-
--no-relative_classname_reference-check
7-
--no-relative_classname_inclusion-check
82
--no-anchor_resource-check
9-
--no-version_comparison-check
10-
--no-manifest_whitespace_closing_bracket_after-check

.sync.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,4 @@ Rakefile:
3737
changelog_since_tag: "3.2.0"
3838
Rakefile:
3939
extra_disabled_lint_checks:
40-
- parameter_types
41-
- parameter_documentation
42-
- top_scope_facts
43-
- legacy_facts
44-
- relative_classname_reference
45-
- relative_classname_inclusion
4640
- anchor_resource
47-
- version_comparison
48-
- manifest_whitespace_closing_bracket_after
49-

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ group :development do
2424
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
2525
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
2626
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
27-
gem "voxpupuli-puppet-lint-plugins", '>= 3.0', require: false, platforms: [:ruby]
27+
gem "voxpupuli-puppet-lint-plugins", '>= 3.0', require: false
2828
gem "github_changelog_generator", require: false
2929
end
3030
group :system_tests do

Rakefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,7 @@ 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')
47-
PuppetLint.configuration.send('disable_top_scope_facts')
48-
PuppetLint.configuration.send('disable_legacy_facts')
49-
PuppetLint.configuration.send('disable_relative_classname_reference')
50-
PuppetLint.configuration.send('disable_relative_classname_inclusion')
5145
PuppetLint.configuration.send('disable_anchor_resource')
52-
PuppetLint.configuration.send('disable_version_comparison')
53-
PuppetLint.configuration.send('disable_manifest_whitespace_closing_bracket_after')
5446

5547

5648
if Bundler.rubygems.find_name('github_changelog_generator').any?

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://${::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: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@
4949
# show_diff property for configuration file resource
5050
#
5151
define apache::custom_config (
52-
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,
58-
Boolean $verify_config = true,
59-
$filename = undef,
60-
$owner = undef,
61-
$group = undef,
62-
$file_mode = undef,
63-
Boolean $show_diff = true,
52+
Enum['absent', 'present'] $ensure = 'present',
53+
String $confdir = $apache::confd_dir,
54+
Optional[String] $content = undef,
55+
Variant[Integer,String,Boolean] $priority = '25',
56+
Optional[String] $source = undef,
57+
String $verify_command = $apache::params::verify_command,
58+
Boolean $verify_config = true,
59+
Optional[String] $filename = undef,
60+
Optional[String] $owner = undef,
61+
Optional[String] $group = undef,
62+
Optional[String] $file_mode = undef,
63+
Boolean $show_diff = true,
6464
) {
6565
if $content and $source {
6666
fail('Only one of $content and $source can be specified.')

manifests/default_confd_files.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
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 {
10-
case $::osfamily {
10+
case $facts['os']['family'] {
1111
'freebsd': {
1212
include apache::confd::no_accf
1313
}

manifests/default_mods.pp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
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
1313
# them to make sure it works.
14-
case $::osfamily {
14+
case $facts['os']['family'] {
1515
'redhat': {
1616
::apache::mod { 'log_config': }
1717
if versioncmp($apache_version, '2.4') >= 0 {
1818
# Lets fork it
1919
# Do not try to load mod_systemd on RHEL/CentOS 6 SCL.
20-
if ( !($::osfamily == 'redhat' and versioncmp($::operatingsystemmajrelease, '7') == -1) and !($::operatingsystem == 'Amazon') ) {
20+
if ( !($facts['os']['family'] == 'redhat' and versioncmp($facts['os']['release']['major'], '7') == -1) and !($facts['os']['name'] == 'Amazon') ) {
2121
if ($use_systemd) {
2222
::apache::mod { 'systemd': }
2323
}
2424
}
25-
if ($::operatingsystem == 'Amazon' and $::operatingsystemrelease == '2') {
25+
if ($facts['os']['name'] == 'Amazon' and $facts['os']['release']['full'] == '2') {
2626
::apache::mod { 'systemd': }
2727
}
2828
::apache::mod { 'unixd': }
@@ -37,15 +37,15 @@
3737
}
3838
default: {}
3939
}
40-
case $::osfamily {
40+
case $facts['os']['family'] {
4141
'gentoo': {}
4242
default: {
4343
::apache::mod { 'authz_host': }
4444
}
4545
}
4646
# The rest of the modules only get loaded if we want all modules enabled
4747
if $all {
48-
case $::osfamily {
48+
case $facts['os']['family'] {
4949
'debian': {
5050
include apache::mod::authn_core
5151
include apache::mod::reqtimeout

0 commit comments

Comments
 (0)