Skip to content

Commit a814310

Browse files
authored
Merge branch 'main' into pdksync_remove_puppet5
2 parents 7bf415d + 8a67aa4 commit a814310

File tree

10 files changed

+105
-36
lines changed

10 files changed

+105
-36
lines changed

.github/workflows/nightly.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
if: ${{ github.repository_owner == 'puppetlabs' }}
5959
run: |
6060
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
61-
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata
61+
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
6262
else
6363
echo "::set-output name=matrix::{}"
6464
fi
@@ -69,6 +69,7 @@ jobs:
6969
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
7070
7171
Acceptance:
72+
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
7273
needs:
7374
- setup_matrix
7475

@@ -82,20 +83,22 @@ jobs:
8283

8384
steps:
8485
- run: |
85-
echo 'platform=${{ matrix.platform }}' >> $BUILDEVENT_FILE
86+
echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
8687
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
88+
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
89+
8790
8891
- name: "Honeycomb: Start recording"
8992
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
9093
with:
9194
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
9295
dataset: ${{ env.HONEYCOMB_DATASET }}
9396
job-status: ${{ job.status }}
94-
matrix-key: ${{ matrix.platform }}-${{ matrix.collection }}
97+
matrix-key: ${{ matrix.platforms.label }}-${{ matrix.collection }}
9598

9699
- name: "Honeycomb: start first step"
97100
run: |
98-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
101+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
99102
echo STEP_START=$(date +%s) >> $GITHUB_ENV
100103
101104
- name: Checkout Source
@@ -117,12 +120,12 @@ jobs:
117120
if: ${{ always() }}
118121
run: |
119122
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
120-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
123+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
121124
echo STEP_START=$(date +%s) >> $GITHUB_ENV
122125
123126
- name: Provision test environment
124127
run: |
125-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platform }}' -- bundle exec rake 'litmus:provision[provision::provision_service,${{ matrix.platform }}]'
128+
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
126129
echo ::group::=== REQUEST ===
127130
cat request.json || true
128131
echo
@@ -144,7 +147,7 @@ jobs:
144147
run: |
145148
echo ::group::honeycomb step
146149
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
147-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
150+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
148151
echo STEP_START=$(date +%s) >> $GITHUB_ENV
149152
echo ::endgroup::
150153
@@ -156,7 +159,7 @@ jobs:
156159
if: ${{ always() }}
157160
run: |
158161
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
159-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
162+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
160163
echo STEP_START=$(date +%s) >> $GITHUB_ENV
161164
162165
- name: Remove test environment

.github/workflows/pr_test.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
id: get-matrix
5656
run: |
5757
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
58-
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata
58+
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
5959
else
6060
echo "::set-output name=matrix::{}"
6161
fi
@@ -66,6 +66,7 @@ jobs:
6666
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
6767
6868
Acceptance:
69+
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
6970
needs:
7071
- setup_matrix
7172
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
@@ -80,20 +81,21 @@ jobs:
8081

8182
steps:
8283
- run: |
83-
echo 'platform=${{ matrix.platform }}' >> $BUILDEVENT_FILE
84+
echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
8485
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
86+
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
8587
8688
- name: "Honeycomb: Start recording"
8789
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
8890
with:
8991
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
9092
dataset: ${{ env.HONEYCOMB_DATASET }}
9193
job-status: ${{ job.status }}
92-
matrix-key: ${{ matrix.platform }}-${{ matrix.collection }}
94+
matrix-key: ${{ matrix.platforms.label }}-${{ matrix.collection }}
9395

9496
- name: "Honeycomb: start first step"
9597
run: |
96-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
98+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
9799
echo STEP_START=$(date +%s) >> $GITHUB_ENV
98100
99101
- name: Checkout Source
@@ -115,12 +117,12 @@ jobs:
115117
if: ${{ always() }}
116118
run: |
117119
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
118-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
120+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
119121
echo STEP_START=$(date +%s) >> $GITHUB_ENV
120122
121123
- name: Provision test environment
122124
run: |
123-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platform }}' -- bundle exec rake 'litmus:provision[provision::provision_service,${{ matrix.platform }}]'
125+
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
124126
echo ::group::=== REQUEST ===
125127
cat request.json || true
126128
echo
@@ -142,7 +144,7 @@ jobs:
142144
run: |
143145
echo ::group::honeycomb step
144146
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
145-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
147+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
146148
echo STEP_START=$(date +%s) >> $GITHUB_ENV
147149
echo ::endgroup::
148150
@@ -154,7 +156,7 @@ jobs:
154156
if: ${{ always() }}
155157
run: |
156158
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
157-
echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
159+
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
158160
echo STEP_START=$(date +%s) >> $GITHUB_ENV
159161
160162
- name: Remove test environment

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [v5.10.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.10.0) (2021-02-16)
6+
7+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.9.0...v5.10.0)
8+
9+
### Added
10+
11+
- \(IAC-1186\) Add $use\_port\_for\_filenames parameter [\#2122](https://github.com/puppetlabs/puppetlabs-apache/pull/2122) ([smortex](https://github.com/smortex))
12+
13+
### Fixed
14+
15+
- \(MODULES-10899\) Handle PHP8 MOD package naming convention changes [\#2121](https://github.com/puppetlabs/puppetlabs-apache/pull/2121) ([sanfrancrisko](https://github.com/sanfrancrisko))
16+
517
## [v5.9.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v5.9.0) (2021-01-25)
618

719
[Full Changelog](https://github.com/puppetlabs/puppetlabs-apache/compare/v5.8.0...v5.9.0)
@@ -114,6 +126,7 @@ All notable changes to this project will be documented in this file. The format
114126
### Added
115127

116128
- \(FM-8672\) - Addition of Support for CentOS 8 [\#1977](https://github.com/puppetlabs/puppetlabs-apache/pull/1977) ([david22swan](https://github.com/david22swan))
129+
- \(MODULES-9948\) Allow switching of thread modules [\#1961](https://github.com/puppetlabs/puppetlabs-apache/pull/1961) ([tuxmea](https://github.com/tuxmea))
117130

118131
### Fixed
119132

@@ -129,7 +142,6 @@ All notable changes to this project will be documented in this file. The format
129142

130143
### Added
131144

132-
- \(MODULES-9948\) Allow switching of thread modules [\#1961](https://github.com/puppetlabs/puppetlabs-apache/pull/1961) ([tuxmea](https://github.com/tuxmea))
133145
- Add parameter version for mod security [\#1953](https://github.com/puppetlabs/puppetlabs-apache/pull/1953) ([tuxmea](https://github.com/tuxmea))
134146
- add possibility to define variables inside VirtualHost definition [\#1947](https://github.com/puppetlabs/puppetlabs-apache/pull/1947) ([trefzer](https://github.com/trefzer))
135147

REFERENCE.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5332,8 +5332,6 @@ Installs `mod_php`.
53325332

53335333
* **TODO** Add docs
53345334

5335-
* **Note** Unsupported platforms: SLES: all
5336-
53375335
#### Parameters
53385336

53395337
The following parameters are available in the `apache::mod::php` class:
@@ -7552,6 +7550,7 @@ The following parameters are available in the `apache::vhost` defined type:
75527550
* [`access_log_env_var`](#access_log_env_var)
75537551
* [`access_logs`](#access_logs)
75547552
* [`use_servername_for_filenames`](#use_servername_for_filenames)
7553+
* [`use_port_for_filenames`](#use_port_for_filenames)
75557554
* [`aliases`](#aliases)
75567555
* [`directories`](#directories)
75577556
* [`error_log`](#error_log)
@@ -8252,6 +8251,14 @@ Data type: `Optional[Boolean]`
82528251

82538252

82548253

8254+
Default value: ``false``
8255+
8256+
##### <a name="use_port_for_filenames"></a>`use_port_for_filenames`
8257+
8258+
Data type: `Optional[Boolean]`
8259+
8260+
8261+
82558262
Default value: ``false``
82568263

82578264
##### <a name="aliases"></a>`aliases`
@@ -9769,6 +9776,7 @@ The following parameters are available in the `apache::vhost::fragment` defined
97699776
* [`priority`](#priority)
97709777
* [`content`](#content)
97719778
* [`order`](#order)
9779+
* [`port`](#port)
97729780

97739781
##### <a name="vhost"></a>`vhost`
97749782

@@ -9802,6 +9810,14 @@ The order to insert the fragment at
98029810

98039811
Default value: `900`
98049812

9813+
##### <a name="port"></a>`port`
9814+
9815+
Data type: `Optional[Integer[0]]`
9816+
9817+
9818+
9819+
Default value: ``undef``
9820+
98059821
## Resource types
98069822

98079823
### <a name="a2mod"></a>`a2mod`

manifests/mod/php.pp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44
# @todo
55
# Add docs
6-
# @note Unsupported platforms: SLES: all
76
class apache::mod::php (
87
$package_name = undef,
98
$package_ensure = 'present',
@@ -17,7 +16,11 @@
1716
$libphp_prefix = 'libphp'
1817
) inherits apache::params {
1918
include apache
20-
$mod = "php${php_version}"
19+
if (versioncmp($php_version, '8') < 0) {
20+
$mod = "php${php_version}"
21+
} else {
22+
$mod = 'php'
23+
}
2124

2225
if $apache::version::scl_httpd_version == undef and $apache::version::scl_php_version != undef {
2326
fail('If you define apache::version::scl_php_version, you also need to specify apache::version::scl_httpd_version')
@@ -66,21 +69,26 @@
6669
# Controls php version and libphp prefix
6770
$_lib = "${libphp_prefix}${php_version}.so"
6871
}
72+
$_module_id = $_php_major ? {
73+
'5' => 'php5_module',
74+
'7' => 'php7_module',
75+
default => 'php_module',
76+
}
6977

7078
if $::operatingsystem == 'SLES' {
7179
::apache::mod { $mod:
7280
package => $_package_name,
7381
package_ensure => $package_ensure,
7482
lib => "mod_${mod}.so",
75-
id => "php${_php_major}_module",
83+
id => $_module_id,
7684
path => "${apache::lib_path}/mod_${mod}.so",
7785
}
7886
} else {
7987
::apache::mod { $mod:
8088
package => $_package_name,
8189
package_ensure => $package_ensure,
8290
lib => $_lib,
83-
id => "php${_php_major}_module",
91+
id => $_module_id,
8492
path => $path,
8593
}
8694
}

manifests/params.pp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -698,26 +698,27 @@
698698
$logroot_mode = undef
699699
$lib_path = '/usr/lib64/apache2' #changes for some modules based on mpm
700700
$mpm_module = 'prefork'
701-
702701
if versioncmp($::operatingsystemrelease, '15') < 0 {
703702
$default_ssl_cert = '/etc/apache2/ssl.crt/server.crt'
704703
$default_ssl_key = '/etc/apache2/ssl.key/server.key'
704+
$php_version = '5'
705705
} else {
706706
$default_ssl_cert = '/etc/apache2/ssl.crt/default-server.crt'
707707
$default_ssl_key = '/etc/apache2/ssl.key/default-server.key'
708+
$php_version = '7'
708709
}
710+
$suphp_configpath = "/etc/php${php_version}/apache2"
709711
$ssl_sessioncache = '/var/lib/apache2/ssl_scache(512000)'
710712
$suphp_addhandler = 'x-httpd-php'
711713
$suphp_engine = 'off'
712-
$suphp_configpath = '/etc/php5/apache2'
713-
$php_version = '5'
714714
if versioncmp($::operatingsystemrelease, '11') < 0 or versioncmp($::operatingsystemrelease, '12') >= 0 {
715-
$mod_packages = {
715+
$mod_packages = {
716716
'auth_kerb' => 'apache2-mod_auth_kerb',
717717
'auth_gssapi' => 'apache2-mod_auth_gssapi',
718718
'dav_svn' => 'subversion-server',
719719
'perl' => 'apache2-mod_perl',
720720
'php5' => 'apache2-mod_php5',
721+
'php7' => 'apache2-mod_php7',
721722
'python' => 'apache2-mod_python',
722723
'security' => 'apache2-mod_security2',
723724
'worker' => 'apache2-worker',

manifests/vhost.pp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,10 +2078,10 @@
20782078
# We will retain the default behaviour for filenames but allow the use of a sanitized version of $servername to be
20792079
# used, using the new $use_servername_for_filenames and $use_port_for_filenames parameters.
20802080
#
2081-
# This will default to false until the next major release (v6.0.0), at which point, we will default this to true and
2082-
# warn about it's imminent deprecation in the subsequent major release (v7.0.0)
2081+
# This will default to false until the next major release (v7.0.0), at which point, we will default this to true and
2082+
# warn about it's imminent deprecation in the subsequent major release (v8.0.0)
20832083
#
2084-
# In v7.0.0, we will deprecate the $use_servername_for_filenames and $use_port_for_filenames parameters altogether
2084+
# In v8.0.0, we will deprecate the $use_servername_for_filenames and $use_port_for_filenames parameters altogether
20852085
# and use the sanitized value of $servername for default log / config filenames.
20862086
$filename = $use_servername_for_filenames ? {
20872087
true => $use_port_for_filenames ? {
@@ -2098,7 +2098,7 @@
20982098
When $use_servername_for_filenames = true, the $servername parameter, sanitized, is used to construct log and config
20992099
file names.
21002100
2101-
From version v6.0.0 of the puppetlabs-apache module, this parameter will default to true. From version v7.0.0 of the
2101+
From version v7.0.0 of the puppetlabs-apache module, this parameter will default to true. From version v8.0.0 of the
21022102
module, the $use_servername_for_filenames will be removed and log/config file names will be dervied from the
21032103
sanitized $servername parameter when not explicitly defined.'
21042104
warning($use_servername_for_filenames_warn_msg)
@@ -2109,7 +2109,7 @@
21092109
When $use_port_for_filenames = true, the $servername and $port parameters, sanitized, are used to construct log and
21102110
config file names.
21112111
2112-
From version v6.0.0 of the puppetlabs-apache module, this parameter will default to true. From version v7.0.0 of the
2112+
From version v7.0.0 of the puppetlabs-apache module, this parameter will default to true. From version v8.0.0 of the
21132113
module, the $use_port_for_filenames will be removed and log/config file names will be dervied from the
21142114
sanitized $servername parameter when not explicitly defined.'
21152115
warning($use_port_for_filenames_warn_msg)

metadata.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "puppetlabs-apache",
3-
"version": "5.9.0",
3+
"version": "5.10.0",
44
"author": "puppetlabs",
55
"summary": "Installs, configures, and manages Apache virtual hosts, web services, and modules.",
66
"license": "Apache-2.0",
@@ -10,11 +10,11 @@
1010
"dependencies": [
1111
{
1212
"name": "puppetlabs/stdlib",
13-
"version_requirement": ">= 4.13.1 < 7.0.0"
13+
"version_requirement": ">= 4.13.1 < 8.0.0"
1414
},
1515
{
1616
"name": "puppetlabs/concat",
17-
"version_requirement": ">= 2.2.1 < 7.0.0"
17+
"version_requirement": ">= 2.2.1 < 8.0.0"
1818
}
1919
],
2020
"operatingsystem_support": [
@@ -59,7 +59,6 @@
5959
{
6060
"operatingsystem": "SLES",
6161
"operatingsystemrelease": [
62-
"11 SP1",
6362
"12",
6463
"15"
6564
]

spec/acceptance/mod_php_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class { 'apache::mod::php': }
4545
describe file("#{apache_hash['mod_dir']}/php7.conf") do
4646
it { is_expected.to contain 'DirectoryIndex index.php' }
4747
end
48+
elsif os[:family] == 'sles' && os[:release].to_i >= 15
49+
describe file("#{apache_hash['mod_dir']}/php7.conf") do
50+
it { is_expected.to contain 'DirectoryIndex index.php' }
51+
end
4852
else
4953
describe file("#{apache_hash['mod_dir']}/php5.conf") do
5054
it { is_expected.to contain 'DirectoryIndex index.php' }

0 commit comments

Comments
 (0)