diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cdfc30f..454906c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,5 +15,5 @@ jobs: needs: Spec uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" with: - flags: "--nightly" + flags: "--platform-include sles-15" secrets: "inherit" diff --git a/manifests/init.pp b/manifests/init.pp index 31750303..310a807f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -111,11 +111,23 @@ } # If the OS is SLES >= 15.3, enable the legacy repo to install net-tools-deprecated package + # Only attempt this if SUSEConnect is available and the system is registered + # Enable Legacy (already in your code) if ($facts['os']['family'] in ['SLES', 'SUSE']) and (versioncmp($facts['os']['release']['full'], '15.3') >= 0) { exec { 'Enable legacy repos': - path => '/bin:/usr/bin/:/sbin:/usr/sbin', - command => "SUSEConnect --product sle-module-legacy/${facts['os']['release']['full']}/x86_64", - unless => "SUSEConnect --status-text | grep sle-module-legacy/${facts['os']['release']['full']}/x86_64", + path => '/bin:/usr/bin:/sbin:/usr/sbin', + command => "SUSEConnect --product sle-module-legacy/${facts['os']['release']['major']}/x86_64", + unless => "test ! -x /usr/bin/SUSEConnect || SUSEConnect --status-text | grep -qE '(Not Registered|sle-module-legacy/${facts['os']['release']['major']}/x86_64)'", + logoutput => true, + } + + # NEW: enable Development Tools (for many *-devel packages, including OpenJDK 8) + exec { 'Enable development tools': + path => '/bin:/usr/bin:/sbin:/usr/sbin', + command => "SUSEConnect --product sle-module-development-tools/${facts['os']['release']['major']}/x86_64", + unless => "test ! -x /usr/bin/SUSEConnect || SUSEConnect --status-text | grep -qE '(Not Registered|sle-module-development-tools/${facts['os']['release']['major']}/x86_64)'", + logoutput => true, + require => Exec['Enable legacy repos'], } }