From ee7a0c427d561311d5c870673c31a167ebd1a2fa Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 4 Jun 2026 19:29:09 +0100 Subject: [PATCH] Merge php::fpm recipe into php::default --- .github/workflows/test-kitchen.yml | 1 - .kitchen.yml | 3 --- cookbooks/dev/recipes/default.rb | 2 +- cookbooks/matomo/recipes/default.rb | 2 +- cookbooks/mediawiki/recipes/default.rb | 2 +- cookbooks/php/recipes/default.rb | 15 +++++++++++ cookbooks/php/recipes/fpm.rb | 35 -------------------------- cookbooks/wordpress/recipes/default.rb | 2 +- 8 files changed, 19 insertions(+), 43 deletions(-) delete mode 100644 cookbooks/php/recipes/fpm.rb diff --git a/.github/workflows/test-kitchen.yml b/.github/workflows/test-kitchen.yml index df2bff52c..d9e2d9789 100644 --- a/.github/workflows/test-kitchen.yml +++ b/.github/workflows/test-kitchen.yml @@ -84,7 +84,6 @@ jobs: - oxidized - passenger - php - - php-fpm - planet - planet-aws - planet-current diff --git a/.kitchen.yml b/.kitchen.yml index 8745f6f5f..4bbc57105 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -331,9 +331,6 @@ suites: - name: php run_list: - recipe[php::default] - - name: php-fpm - run_list: - - recipe[php::fpm] - name: planet run_list: - recipe[planet::default] diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index f62f60091..4ff54a1df 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -27,7 +27,7 @@ include_recipe "git" include_recipe "memcached" include_recipe "mysql" include_recipe "nodejs" -include_recipe "php::fpm" +include_recipe "php" include_recipe "podman" include_recipe "postgresql" include_recipe "python" diff --git a/cookbooks/matomo/recipes/default.rb b/cookbooks/matomo/recipes/default.rb index 5557d78d0..1534f4b85 100644 --- a/cookbooks/matomo/recipes/default.rb +++ b/cookbooks/matomo/recipes/default.rb @@ -20,7 +20,7 @@ include_recipe "apache" include_recipe "geoipupdate" include_recipe "mysql" -include_recipe "php::fpm" +include_recipe "php" passwords = data_bag_item("matomo", "passwords") diff --git a/cookbooks/mediawiki/recipes/default.rb b/cookbooks/mediawiki/recipes/default.rb index 93ded2b5f..7442ca27c 100644 --- a/cookbooks/mediawiki/recipes/default.rb +++ b/cookbooks/mediawiki/recipes/default.rb @@ -22,7 +22,7 @@ include_recipe "apt" include_recipe "git" include_recipe "memcached" include_recipe "mysql" -include_recipe "php::fpm" +include_recipe "php" # Mediawiki Base Requirements package %w[ diff --git a/cookbooks/php/recipes/default.rb b/cookbooks/php/recipes/default.rb index 3164006a4..984663971 100644 --- a/cookbooks/php/recipes/default.rb +++ b/cookbooks/php/recipes/default.rb @@ -17,7 +17,22 @@ # limitations under the License. # +include_recipe "prometheus" + package %W[ php + php-fpm php#{node[:php][:version]}-fpm ] + +template "/etc/php/#{node[:php][:version]}/fpm/conf.d/99-chef.ini" do + source "php-fpm.ini.erb" + owner "root" + group "root" + mode "644" + notifies :restart, "service[php#{node[:php][:version]}-fpm]" +end + +service "php#{node[:php][:version]}-fpm" do + action [:enable, :start] +end diff --git a/cookbooks/php/recipes/fpm.rb b/cookbooks/php/recipes/fpm.rb deleted file mode 100644 index 2bebc87d2..000000000 --- a/cookbooks/php/recipes/fpm.rb +++ /dev/null @@ -1,35 +0,0 @@ -# -# Cookbook:: php -# Recipe:: fpm -# -# Copyright:: 2020, OpenStreetMap Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -include_recipe "php" -include_recipe "prometheus" - -package "php-fpm" - -template "/etc/php/#{node[:php][:version]}/fpm/conf.d/99-chef.ini" do - source "php-fpm.ini.erb" - owner "root" - group "root" - mode "644" - notifies :restart, "service[php#{node[:php][:version]}-fpm]" -end - -service "php#{node[:php][:version]}-fpm" do - action [:enable, :start] -end diff --git a/cookbooks/wordpress/recipes/default.rb b/cookbooks/wordpress/recipes/default.rb index e8ca53456..37ad04e01 100644 --- a/cookbooks/wordpress/recipes/default.rb +++ b/cookbooks/wordpress/recipes/default.rb @@ -21,7 +21,7 @@ include_recipe "apache" include_recipe "fail2ban" include_recipe "git" include_recipe "mysql" -include_recipe "php::fpm" +include_recipe "php" package %w[ subversion -- 2.47.3