Skip to content

Commit aee0d38

Browse files
committed
puppet-lint: autofix
1 parent 8df6dd1 commit aee0d38

File tree

9 files changed

+6
-18
lines changed

9 files changed

+6
-18
lines changed

functions/bool2num_hash_recursive.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function yum::bool2num_hash_recursive($arg) {
3434
Hash => yum::bool2num_hash_recursive($value),
3535
default => $value,
3636
}
37-
Hash({ $key => $return_value })
37+
Hash( { $key => $return_value })
3838
}.reduce |$attrs_memo, $kv| {
3939
merge($attrs_memo, $kv)
4040
}

manifests/clean.pp

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# A $(yum clean all) Exec to be notified if desired.
22
class yum::clean {
3-
4-
exec{'yum_clean_all':
3+
exec { 'yum_clean_all':
54
command => '/usr/bin/yum clean all',
65
refreshonly => true,
76
}
8-
97
}

manifests/config.pp

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
Variant[Boolean, Integer, Enum['absent'], String] $ensure,
2626
String $key = $title,
2727
) {
28-
2928
$_ensure = $ensure ? {
3029
Boolean => bool2num($ensure),
3130
default => $ensure,

manifests/gpgkey.pp

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
String $group = 'root',
3636
String $mode = '0644'
3737
) {
38-
3938
$_creators = [$content, $source]
4039
$_used_creators = $_creators.filter |$value| { !empty($value) }
4140

manifests/group.pp

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
Enum['present', 'installed', 'latest', 'absent', 'purged'] $ensure = 'present',
2424
Optional[Integer] $timeout = undef,
2525
) {
26-
2726
Exec {
2827
path => '/bin:/usr/bin:/sbin:/usr/sbin',
2928
environment => 'LC_ALL=C',

manifests/init.pp

+4-5
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
class yum (
9797
Boolean $clean_old_kernels = true,
9898
Boolean $keep_kernel_devel = false,
99-
Hash[String, Variant[String, Integer, Boolean, Hash[String, Variant[String, Integer, Boolean]]]] $config_options = { },
99+
Hash[String, Variant[String, Integer, Boolean, Hash[String, Variant[String, Integer, Boolean]]]] $config_options = {},
100100
Optional[Hash[String, Optional[Hash[String, Variant[String, Integer, Boolean]]]]] $repos = {},
101101
Array[String] $managed_repos = [],
102102
Boolean $manage_os_default_repos = false,
@@ -105,7 +105,6 @@
105105
Hash[String, Hash[String, String]] $gpgkeys = {},
106106
String $utils_package_name = 'yum-utils',
107107
) {
108-
109108
$module_metadata = load_module_metadata($module_name)
110109
$supported_operatingsystems = $module_metadata['operatingsystem_support']
111110
$supported_os_names = $supported_operatingsystems.map |$os| {
@@ -162,16 +161,16 @@
162161
}
163162

164163
$_normalized_ensure = $_ensure ? {
165-
Boolean => Hash({ ensure => bool2num($_ensure) }), # lint:ignore:unquoted_string_in_selector
166-
default => Hash({ ensure => $_ensure }), # lint:ignore:unquoted_string_in_selector
164+
Boolean => Hash( { ensure => bool2num($_ensure) }), # lint:ignore:unquoted_string_in_selector
165+
default => Hash( { ensure => $_ensure }), # lint:ignore:unquoted_string_in_selector
167166
}
168167

169168
$_normalized_attrs = $attrs ? {
170169
Hash => merge($attrs, $_normalized_ensure),
171170
default => $_normalized_ensure,
172171
}
173172

174-
Hash({ $key => $_normalized_attrs })
173+
Hash( { $key => $_normalized_attrs })
175174
}.reduce |$memo, $cfg_opt_hash| {
176175
merge($memo, $cfg_opt_hash)
177176
}

manifests/install.pp

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
Enum['present', 'installed', 'absent', 'purged'] $ensure = 'present',
2626
Optional[Integer] $timeout = undef,
2727
) {
28-
2928
Exec {
3029
path => '/bin:/usr/bin:/sbin:/usr/sbin',
3130
environment => 'LC_ALL=C',

manifests/plugin/versionlock.pp

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
String $path = '/etc/yum/pluginconf.d/versionlock.list',
1919
Boolean $clean = false,
2020
) {
21-
2221
yum::plugin { 'versionlock':
2322
ensure => $ensure,
2423
}

manifests/versionlock.pp

-4
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,12 @@
6868
}
6969

7070
if $facts['package_provider'] == 'yum' and $version =~ Undef {
71-
7271
assert_type(Yum::VersionlockString, $name) |$_expected, $actual | {
7372
fail("Package name must be formatted as %{EPOCH}:%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}, not \'${actual}\'. See Yum::Versionlock documentation for details.")
7473
}
7574

7675
$_versionlock = "${line_prefix}${name}"
77-
7876
} else {
79-
8077
assert_type(Yum::RpmName, $name) |$_expected, $actual | {
8178
fail("Package name must be formatted as Yum::RpmName, not \'${actual}\'. See Yum::Rpmname documentation for details.")
8279
}
@@ -89,7 +86,6 @@
8986
'yum' => "${line_prefix}${epoch}:${name}-${version}-${release}.${arch}",
9087
default => "${line_prefix}${name}-${epoch}:${version}-${release}.${arch}",
9188
}
92-
9389
}
9490

9591
unless $ensure == 'absent' {

0 commit comments

Comments
 (0)