File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 111111 }
112112
113113 # 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
114115 if ($facts [' os' ][' family' ] in [' SLES' , ' SUSE' ]) and (versioncmp($facts [' os' ][' release' ][' full' ], ' 15.3' ) >= 0) {
115- exec { 'Enable legacy repos (major only) ' :
116+ exec { 'Enable legacy repos' :
116117 path => ' /bin:/usr/bin:/sbin:/usr/sbin' ,
117118 command => " SUSEConnect --product sle-module-legacy/${facts['os']['release']['major']}/x86_64" ,
118- unless => " SUSEConnect --list-extensions | grep -q 'Legacy Module .* (Activated )'" ,
119+ unless => " test ! -x /usr/bin/ SUSEConnect || SUSEConnect --status-text | grep -qE '(Not Registered|sle-module-legacy/${facts['os']['release']['major']}/x86_64 )'" ,
119120 }
120121 }
121122
You can’t perform that action at this time.
0 commit comments