Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions manifests/mod/php.pp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@
}

if $facts['os']['name'] == 'SLES' {
# Enable legacy repo to install apache2-mod_php7 package
# if SUSE OS major version is >= 15 and minor version is > 3
if ($_package_name == 'apache2-mod_php7' and versioncmp($facts['os']['release']['major'], '15') >= 0 and versioncmp($facts['os']['release']['minor'], '3') == 1) {
exec { 'enable legacy repos':
path => '/bin:/usr/bin/:/sbin:/usr/sbin',
command => 'SUSEConnect --product sle-module-legacy/15.4/x86_64',
unless => 'SUSEConnect --status-text | grep sle-module-legacy/15.4/x86_64',
}
}

::apache::mod { $mod:
package => $_package_name,
package_ensure => $package_ensure,
Expand Down
9 changes: 9 additions & 0 deletions spec/setup_acceptance_node.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@

case $facts['os']['family'] {
'SLES', 'SUSE': {
# Enable legacy repo to install net-tools-deprecated package
# If SUSE OS major version is >= 15 and minor version is > 3
if (versioncmp($facts['os']['release']['major'], '15') >= 0 and versioncmp($facts['os']['release']['minor'], '3') == 1) {
exec { 'enable legacy repos':
path => '/bin:/usr/bin/:/sbin:/usr/sbin',
command => 'SUSEConnect --product sle-module-legacy/15.4/x86_64',
unless => 'SUSEConnect --status-text | grep sle-module-legacy/15.4/x86_64',
}
}
# needed for netstat, for serverspec checks
package { 'net-tools-deprecated':
ensure => 'latest',
Expand Down