Skip to content

Commit 1e5dc1c

Browse files
committed
bring back temporary fix to test against redundancy
1 parent c5d469b commit 1e5dc1c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

manifests/init.pp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,19 @@
110110
default => '--jre'
111111
}
112112

113+
# TEMPORARY FIX: If no repos are configured on SLES, add openSUSE Leap as fallback
114+
# This workaround is needed because GCP-provisioned SLES images are unregistered BYOS
115+
# without any package repositories configured. Remove this once proper PAYG images are used.
116+
if ($facts['os']['family'] in ['SLES', 'SUSE']) {
117+
exec { 'Configure zypper repo for SLES':
118+
path => '/bin:/usr/bin:/sbin:/usr/sbin',
119+
command => 'zypper --non-interactive --gpg-auto-import-keys ar http://download.opensuse.org/distribution/leap/15.6/repo/oss/ opensuse-leap-fallback && zypper --non-interactive --gpg-auto-import-keys refresh',
120+
unless => "zypper lr 2>/dev/null | grep -q 'opensuse-leap-fallback\\|http'",
121+
logoutput => true,
122+
}
123+
-> Package['java']
124+
}
125+
113126
if $facts['os']['family'] == 'Debian' {
114127
# Needed for update-java-alternatives
115128
package { 'java-common':

0 commit comments

Comments
 (0)