Skip to content

Commit 8df3c03

Browse files
committed
(maint) Block lint checks
This commit blocks the top_scope_facts, only_variable_string, and strinct_indent lint check for portions of manifests/install/windows.pp, manifests/osfamily/redhat.pp, and manifests/osfamily/suse.pp respectively. For the top_scope_facts, the check keeps on thinking `puppet_agent::_expected_package_version` in windows.pp is a fact. For the only_variable_string, when I try to remove the double quotes from `"${facts['os']['release']['major']}"`, the conditional no longer works as expected in redhat.pp. Lastly, for the strict_indent check, it thinks the indentation for $script in redhat.pp and suse.pp is wrong but it is not.
1 parent 3e49f2a commit 8df3c03

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

manifests/install/windows.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
content => file('puppet_agent/prerequisites_check.ps1'),
8383
}
8484

85+
# lint:ignore:top_scope_facts
8586
exec { 'prerequisites_check.ps1':
8687
command => "${facts['os']['windows']['system32']}\\WindowsPowerShell\\v1.0\\powershell.exe \
8788
-ExecutionPolicy Bypass \
@@ -129,6 +130,7 @@
129130
Exec['prerequisites_check.ps1'],
130131
],
131132
}
133+
# lint:endignore
132134

133135
# PUP-5480/PE-15037 Cache dir loses inheritable SYSTEM perms
134136
exec { 'fix inheritable SYSTEM perms':

manifests/osfamily/redhat.pp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
}
1313
contain puppet_agent::prepare::package
1414
} else {
15+
# lint:ignore:only_variable_string
1516
case $facts['os']['name'] {
1617
'Fedora': {
1718
$platform_and_version = "fedora/${facts['os']['release']['major']}"
@@ -28,7 +29,8 @@
2829
$platform_and_version = "el/${facts['os']['release']['major']}"
2930
}
3031
}
31-
if ($::puppet_agent::is_pe and (!$::puppet_agent::use_alternate_sources)) {
32+
# lint:endignore
33+
if ($puppet_agent::is_pe and (!$puppet_agent::use_alternate_sources)) {
3234
$pe_server_version = pe_build_version()
3335
# Treat Amazon Linux just like Enterprise Linux
3436
$pe_repo_dir = ($facts['os']['name'] == 'Amazon') ? {
@@ -75,6 +77,7 @@
7577
$_sslclientkey_path = undef
7678
}
7779

80+
# lint:ignore:strict_indent
7881
$legacy_keyname = 'GPG-KEY-puppet'
7982
$legacy_gpg_path = "/etc/pki/rpm-gpg/RPM-${legacy_keyname}"
8083
$keyname = 'GPG-KEY-puppet-20250406'

manifests/osfamily/suse.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
}
5656
}
5757

58+
# lint:ignore:strict_indent
5859
case $facts['os']['release']['major'] {
5960
'11', '12', '15': {
6061
# Import the GPG key
@@ -85,6 +86,7 @@
8586
rpm --import "${GPG_KEY_PATH}"
8687
fi
8788
| SCRIPT
89+
# lint:endignore
8890

8991
if getvar('::puppet_agent::manage_pki_dir') == true {
9092
file { ['/etc/pki', '/etc/pki/rpm-gpg']:

0 commit comments

Comments
 (0)