Skip to content

Commit 2a81ffa

Browse files
committed
implement osmirror configuration, test against all sles, remove ngrok
1 parent 5412abf commit 2a81ffa

2 files changed

Lines changed: 9 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
Acceptance:
1515
needs: Spec
16-
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@MAINT-GCP_troubleshooting"
16+
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
1717
with:
18-
flags: "--platform-include sles-15"
18+
flags: "--platform-include sles-15 --platform-include sles-12"
1919
secrets: "inherit"

manifests/init.pp

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -110,25 +110,16 @@
110110
default => '--jre'
111111
}
112112

113-
# If the OS is SLES >= 15.3, enable the legacy repo to install net-tools-deprecated package
114-
# Only attempt this if SUSEConnect is available and the system is registered
115-
# Enable Legacy (already in your code)
116-
if ($facts['os']['family'] in ['SLES', 'SUSE']) and (versioncmp($facts['os']['release']['full'], '15.3') >= 0) {
117-
exec { 'Enable legacy repos':
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 { 'Add openSUSE repo if no repos exist':
118118
path => '/bin:/usr/bin:/sbin:/usr/sbin',
119-
command => "SUSEConnect --product sle-module-legacy/${facts['os']['release']['major']}/x86_64",
120-
unless => "test ! -x /usr/bin/SUSEConnect || SUSEConnect --status-text | grep -qE '(Not Registered|sle-module-legacy/${facts['os']['release']['major']}/x86_64)'",
119+
command => 'zypper --non-interactive --gpg-auto-import-keys ar http://download.opensuse.org/distribution/leap/15.6/repo/oss/ opensuse-leap-fallback',
120+
unless => "zypper lr | grep -q '|'",
121121
logoutput => true,
122122
}
123-
124-
# NEW: enable Development Tools (for many *-devel packages, including OpenJDK 8)
125-
exec { 'Enable development tools':
126-
path => '/bin:/usr/bin:/sbin:/usr/sbin',
127-
command => "SUSEConnect --product sle-module-development-tools/${facts['os']['release']['major']}/x86_64",
128-
unless => "test ! -x /usr/bin/SUSEConnect || SUSEConnect --status-text | grep -qE '(Not Registered|sle-module-development-tools/${facts['os']['release']['major']}/x86_64)'",
129-
logoutput => true,
130-
require => Exec['Enable legacy repos'],
131-
}
132123
}
133124

134125
if $facts['os']['family'] == 'Debian' {

0 commit comments

Comments
 (0)