Skip to content

Commit 601fa06

Browse files
committed
Bugfix: disable failovermethod in yumrepo on EL8
failovermethod is not supported by DNF, so remove that line completly on EL8 (and newer) as long as $priority is unset too.
1 parent 8645e91 commit 601fa06

File tree

1 file changed

+7
-2
lines changed
  • manifests/repo/nodesource

1 file changed

+7
-2
lines changed

manifests/repo/nodesource/yum.pp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
default => '0',
1717
}
1818

19+
$yum_failovermethod = (versioncmp($facts['os']['release']['major'], '8') >= 0 and $priority == 'absent') ? {
20+
true => 'absent',
21+
default => 'priority',
22+
}
23+
1924
if ($ensure == 'present') {
2025
if $facts['os']['release']['major'] == '8' {
2126
file { 'dnf_module':
@@ -32,7 +37,7 @@
3237
descr => $descr,
3338
baseurl => $baseurl,
3439
enabled => '1',
35-
failovermethod => 'priority',
40+
failovermethod => $yum_failovermethod,
3641
gpgkey => 'file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL',
3742
gpgcheck => '1',
3843
priority => $priority,
@@ -46,7 +51,7 @@
4651
descr => $source_descr,
4752
baseurl => $source_baseurl,
4853
enabled => $yum_source_enabled,
49-
failovermethod => 'priority',
54+
failovermethod => $yum_failovermethod,
5055
gpgkey => 'file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL',
5156
gpgcheck => '1',
5257
priority => $priority,

0 commit comments

Comments
 (0)