Skip to content
Open
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
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: ci

jobs:
lint-unit:
uses: sous-chefs/.github/.github/workflows/lint-unit.yml@main
uses: sous-chefs/.github/.github/workflows/lint-unit.yml@6.0.0
permissions:
actions: write
checks: write
Expand All @@ -32,7 +32,8 @@ jobs:
- centos-stream-10
- debian-12
- debian-13
- opensuse-leap-15
- fedora-latest
- opensuse-leap-160
- oraclelinux-8
- oraclelinux-9
- rockylinux-8
Expand Down Expand Up @@ -63,17 +64,17 @@ jobs:
# See: https://github.com/amazonlinux/amazon-linux-2023/issues/532
- os: amazonlinux-2023
suite: mod-wsgi
# mod_wsgi idempotency issue on openSUSE Leap 15 - package reinstalls on second run
- os: opensuse-leap-15
# mod_wsgi idempotency issue on openSUSE Leap - package reinstalls on second run
- os: opensuse-leap-160
suite: mod-wsgi

steps:
- name: Check out code
uses: actions/checkout@v5
- name: Install Chef
uses: actionshub/chef-install@main
uses: actions/checkout@v6
- name: Install Cinc Workstation
uses: sous-chefs/.github/.github/actions/install-workstation@6.0.0
- name: Dokken
uses: actionshub/test-kitchen@main
uses: actionshub/test-kitchen@3.0.0
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.dokken.yml
Expand All @@ -91,4 +92,4 @@ jobs:
runs-on: ubuntu-latest
needs: [integration]
steps:
- run: echo ${{needs.integration.outputs}}
- run: echo "Integration complete"
6 changes: 3 additions & 3 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
contents: read
steps:
- name: Check out code
uses: actions/checkout@v5
- name: Install Chef
uses: actionshub/chef-install@main
uses: actions/checkout@v6
- name: Install Cinc Workstation
uses: sous-chefs/.github/.github/actions/install-workstation@6.0.0
- name: Install cookbooks
run: berks install
2 changes: 1 addition & 1 deletion LIMITATIONS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Apache2 Cookbook Limitations

- Supported platforms are limited to the distributions covered by the Kitchen and CI matrices: AlmaLinux 8+, Amazon Linux 2023, CentOS Stream 9+, Debian 12+, Fedora, openSUSE Leap 15+, Oracle Linux 8+, Rocky Linux 8+, and Ubuntu 22.04+.
- Supported platforms are limited to the distributions covered by the Kitchen and CI matrices: AlmaLinux 8+, Amazon Linux 2023, CentOS Stream 9+, Debian 12+, Fedora, openSUSE Leap 16+, Oracle Linux 8+, Rocky Linux 8+, and Ubuntu 22.04+.
- Platform-specific module package availability still depends on the underlying distribution repositories.
- This modernization branch no longer advertises legacy CentOS, Scientific Linux, FreeBSD, openSUSE classic, SUSE, or Arch support.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@ On ArchLinux, if you are using the `apache2::mod_auth_openid` recipe, you also n

The following platforms and versions are tested and supported using [test-kitchen](https://kitchen.ci/)

- AlmaLinux 8+
- Amazon Linux 2023
- CentOS 7+ (incl. Rocky & Alma)
- Debian 10+
- CentOS Stream 9+
- Debian 12+
- Fedora latest
- OpenSUSE Leap 15
- Ubuntu 18.04+
- OpenSUSE Leap 16+
- Oracle Linux 8+
- Rocky Linux 8+
- Ubuntu 22.04+

## Usage

Expand Down
4 changes: 2 additions & 2 deletions kitchen.dokken.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ platforms:
image: dokken/fedora-latest
pid_one_command: /usr/lib/systemd/systemd

- name: opensuse-leap-15
- name: opensuse-leap-16.0
driver:
image: dokken/opensuse-leap-15
image: dokken/opensuse-leap-16.0
pid_one_command: /usr/lib/systemd/systemd

- name: oraclelinux-8
Expand Down
8 changes: 5 additions & 3 deletions kitchen.global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ verifier:
platforms:
- name: almalinux-8
- name: almalinux-9
- name: almalinux-10
- name: amazonlinux-2023
- name: centos-stream-9
- name: debian-11
- name: centos-stream-10
- name: debian-12
- name: debian-13
- name: fedora-latest
- name: opensuse-leap-15
- name: opensuse-leap-16.0
- name: oraclelinux-8
- name: oraclelinux-9
- name: rockylinux-8
- name: rockylinux-9
- name: ubuntu-20.04
- name: rockylinux-10
- name: ubuntu-22.04
- name: ubuntu-24.04
2 changes: 1 addition & 1 deletion kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ platforms:
- name: debian-12
- name: debian-13
- name: fedora-latest
- name: opensuse-leap-15
- name: opensuse-leap-16.0
- name: oraclelinux-8
- name: oraclelinux-9
- name: rockylinux-8
Expand Down
6 changes: 3 additions & 3 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ def default_modules

case node['platform_family']
when 'rhel', 'fedora', 'amazon'
default_modules.concat %w(log_config logio unixd systemd)
default_modules.push('log_config', 'logio', 'unixd', 'systemd')
when 'arch', 'freebsd'
default_modules.concat %w(log_config logio unixd)
default_modules.push('log_config', 'logio', 'unixd')
when 'suse'
default_modules.concat %w(log_config logio)
default_modules.push('log_config', 'logio')
else
default_modules
end
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
supports 'centos_stream', '>= 9.0'
supports 'debian', '>= 12.0'
supports 'fedora'
supports 'opensuseleap', '>= 15.0'
supports 'opensuseleap', '>= 16.0'
supports 'oracle', '>= 8.0'
supports 'rocky', '>= 8.0'
supports 'ubuntu', '>= 22.04'
4 changes: 2 additions & 2 deletions resources/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

property :docroot_dir, String,
default: lazy { default_docroot_dir },
description: 'Apache document root.'\
description: 'Apache document root.' \
'Defaults to platform specific locations, see libraries/helpers.rb'

property :timeout, [Integer, String],
Expand All @@ -58,7 +58,7 @@

property :run_dir, String,
default: lazy { default_run_dir },
description: ' Sets the DefaultRuntimeDir directive.'\
description: ' Sets the DefaultRuntimeDir directive.' \
'Defaults to platform specific locations, see libraries/helpers.rb'

property :template_cookbook, String,
Expand Down
10 changes: 5 additions & 5 deletions resources/default_site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@

property :docroot_dir, String,
default: lazy { default_docroot_dir },
description: 'Apache document root.'\
description: 'Apache document root.' \
'Defaults to platform specific locations, see libraries/helpers.rb'

property :apache_root_group, String,
default: lazy { node['root_group'] },
description: 'Group that the root user on the box runs as.'\
description: 'Group that the root user on the box runs as.' \
'Defaults to platform specific locations, see libraries/helpers.rb'

property :template_source, String,
Expand All @@ -57,7 +57,7 @@
group new_resource.apache_root_group
mode '0644'
cookbook new_resource.template_cookbook
variables new_resource.variables.merge({
variables new_resource.variables.merge(
access_log: default_access_log,
cgibin_dir: default_cgibin_dir,
docroot_dir: new_resource.docroot_dir,
Expand All @@ -66,8 +66,8 @@
log_level: new_resource.log_level,
port: new_resource.port,
server_admin: new_resource.server_admin,
site_name: new_resource.default_site_name,
})
site_name: new_resource.default_site_name
)
end

apache2_site new_resource.default_site_name do
Expand Down
14 changes: 7 additions & 7 deletions resources/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@

property :apache_user, String,
default: lazy { default_apache_user },
description: 'Set to override the default apache2 user.'\
description: 'Set to override the default apache2 user.' \
'Defaults to platform specific locations, see libraries/helpers.rb'

property :apache_group, String,
default: lazy { default_apache_group },
description: 'Set to override the default apache2 user.'\
description: 'Set to override the default apache2 user.' \
'Defaults to platform specific locations, see libraries/helpers.rb'

property :log_dir, String,
default: lazy { default_log_dir },
description: 'Log directory location.'\
description: 'Log directory location.' \
'Defaults to platform specific locations, see libraries/helpers.rb'

property :error_log, String,
default: lazy { default_error_log },
description: 'Error log location.'\
description: 'Error log location.' \
'Defaults to platform specific locations, see libraries/helpers.rb'

property :log_level, String,
Expand Down Expand Up @@ -76,7 +76,7 @@

property :mpm, String,
default: lazy { default_mpm },
description: 'Multi-processing Module.'\
description: 'Multi-processing Module.' \
'Defaults to platform specific locations, see libraries/helpers.rb'

property :mpm_conf, Hash,
Expand Down Expand Up @@ -111,12 +111,12 @@

property :docroot_dir, String,
default: lazy { default_docroot_dir },
description: 'Apache document root.'\
description: 'Apache document root.' \
'Defaults to platform specific locations, see libraries/helpers.rb'

property :run_dir, String,
default: lazy { default_run_dir },
description: 'Location for APACHE_RUN_DIR.'\
description: 'Location for APACHE_RUN_DIR.' \
'Defaults to platform specific locations, see libraries/helpers.rb'

property :access_file_name, String,
Expand Down
4 changes: 2 additions & 2 deletions spec/libraries/mod_php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ class DummyClass < Chef::Node
it { expect(subject.apache_mod_php_filename).to eq 'libphp8.3.so' }
end

context 'opensuse 15.5' do
context 'opensuse 16.0' do
let(:platform_family) { 'suse' }
let(:platform) { 'opensuse' }
let(:platform_version) { '15.5' }
let(:platform_version) { '16.0' }
it { expect(subject.apache_mod_php_filename).to eq 'mod_php8.so' }
end
end
Expand Down
3 changes: 0 additions & 3 deletions test/integration/basic_site/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
name: apache2-basic
title: Integration tests for apache2 cookbook
summary: This InSpec profile contains integration tests for apache2 cookbook
supports:
- os-family: linux
- os-family: bsd
depends:
- name: apache2-default
path: test/integration/default
4 changes: 0 additions & 4 deletions test/integration/custom_template/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
name: apache2-default
title: Integration tests for apache2 cookbook
summary: This InSpec profile contains integration tests for apache2 cookbook
supports:
- os-family: linux
- os-family: bsd

depends:
- name: apache2-default
path: test/integration/default
3 changes: 0 additions & 3 deletions test/integration/default/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@
name: apache2-default
title: Integration tests for apache2 cookbook
summary: This InSpec profile contains integration tests for apache2 cookbook
supports:
- os-family: linux
- os-family: bsd
3 changes: 0 additions & 3 deletions test/integration/install_override/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
name: apache2-overrides
title: Integration tests for apache2 cookbook
summary: This InSpec profile contains integration tests for apache2 cookbook
supports:
- os-family: linux
- os-family: bsd
depends:
- name: apache2-default
path: test/integration/default
3 changes: 0 additions & 3 deletions test/integration/mod_auth_cas/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
name: apache2-auth-cas
title: Integration tests for apache2 cookbook
summary: This InSpec profile contains integration tests for apache2 cookbook
supports:
- os-family: linux
- os-family: bsd
depends:
- name: apache2-default
path: test/integration/default
3 changes: 0 additions & 3 deletions test/integration/mod_wsgi/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
name: apache2-mod-wsgi
title: Integration tests for apache2 cookbook
summary: This InSpec profile contains integration tests for apache2 cookbook
supports:
- os-family: linux
- os-family: bsd
depends:
- name: apache2-default
path: test/integration/default
3 changes: 0 additions & 3 deletions test/integration/module_template/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
name: apache2-module-templates
title: Integration tests for apache2 cookbook
summary: This InSpec profile contains integration tests for apache2 cookbook
supports:
- os-family: linux
- os-family: bsd
depends:
- name: apache2-default
path: test/integration/default
3 changes: 0 additions & 3 deletions test/integration/php/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
name: apache2-php
title: Integration tests for apache2 cookbook
summary: This InSpec profile contains integration tests for apache2 cookbook
supports:
- os-family: linux
- os-family: bsd
depends:
- name: apache2-default
path: test/integration/default
3 changes: 0 additions & 3 deletions test/integration/pkg_name/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
name: apache2-pkg-name
title: Integration tests for apache2 cookbook
summary: This InSpec profile contains integration tests for apache2 cookbook
supports:
- os-family: linux
- os-family: bsd
depends:
- name: apache2-default
path: test/integration/default
3 changes: 0 additions & 3 deletions test/integration/ports/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
name: apache2-ports
title: Integration tests for apache2 cookbook
summary: This InSpec profile contains integration tests for apache2 cookbook
supports:
- os-family: linux
- os-family: bsd
depends:
- name: apache2-default
path: test/integration/default
3 changes: 0 additions & 3 deletions test/integration/ssl/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
name: apache2-ssl
title: Integration tests for apache2 cookbook
summary: This InSpec profile contains integration tests for apache2 cookbook
supports:
- os-family: linux
- os-family: bsd
depends:
- name: apache2-default
path: test/integration/default
Loading