Skip to content

Commit 0c678e6

Browse files
Merge pull request #2429 from puppetlabs/maint-apache2-mod_php7
(MAINT) Enable legacy SP3 repository for SUSE
2 parents 6ef5fbf + 6ca4154 commit 0c678e6

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

manifests/mod/php.pp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@
106106
}
107107

108108
if $facts['os']['name'] == 'SLES' {
109+
# Enable legacy repo to install apache2-mod_php7 package
110+
# if SUSE OS major version is >= 15 and minor version is > 3
111+
if ($_package_name == 'apache2-mod_php7' and versioncmp($facts['os']['release']['major'], '15') >= 0 and versioncmp($facts['os']['release']['minor'], '3') == 1) {
112+
exec { 'enable legacy repos':
113+
path => '/bin:/usr/bin/:/sbin:/usr/sbin',
114+
command => 'SUSEConnect --product sle-module-legacy/15.4/x86_64',
115+
unless => 'SUSEConnect --status-text | grep sle-module-legacy/15.4/x86_64',
116+
}
117+
}
118+
109119
::apache::mod { $mod:
110120
package => $_package_name,
111121
package_ensure => $package_ensure,

spec/setup_acceptance_node.pp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55

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

0 commit comments

Comments
 (0)