Update cookbooks for Ubuntu 16.04 TLS
This commit is contained in:
@@ -24,6 +24,8 @@ include_recipe 'apt::default' if node['platform_family'] == 'debian'
|
||||
if node['php-fpm']['package_name'].nil?
|
||||
if platform_family?("rhel", "fedora")
|
||||
php_fpm_package_name = "php-fpm"
|
||||
elsif platform?('ubuntu') and node['platform_version'].to_f >= 16.04
|
||||
php_fpm_package_name = "php7.0-fpm"
|
||||
else
|
||||
php_fpm_package_name = "php5-fpm"
|
||||
end
|
||||
@@ -42,9 +44,16 @@ else
|
||||
php_fpm_service_name = node['php-fpm']['service_name']
|
||||
end
|
||||
|
||||
service_provider = nil
|
||||
# this is actually already done in chef, but is kept here for older chef releases
|
||||
if platform?('ubuntu') and node['platform_version'].to_f.between?(13.10, 14.10)
|
||||
service_provider = ::Chef::Provider::Service::Upstart
|
||||
end
|
||||
|
||||
directory node['php-fpm']['log_dir']
|
||||
|
||||
service "php-fpm" do
|
||||
provider service_provider if service_provider
|
||||
service_name php_fpm_service_name
|
||||
supports :start => true, :stop => true, :restart => true, :reload => true
|
||||
action [ :enable, :start ]
|
||||
|
||||
@@ -38,10 +38,18 @@ when 'debian'
|
||||
# Configure Dotdeb repos
|
||||
# TODO: move this to it's own 'dotdeb' cookbook?
|
||||
# http://www.dotdeb.org/instructions/
|
||||
if node.platform_version.to_f >= 7.0
|
||||
if node.platform_version.to_f >= 8.0
|
||||
apt_repository "dotdeb" do
|
||||
uri node['php-fpm']['dotdeb_repository']['uri']
|
||||
distribution "stable"
|
||||
distribution "jessie"
|
||||
components ['all']
|
||||
key node['php-fpm']['dotdeb_repository']['key']
|
||||
action :add
|
||||
end
|
||||
elsif node.platform_version.to_f >= 7.0
|
||||
apt_repository "dotdeb" do
|
||||
uri node['php-fpm']['dotdeb_repository']['uri']
|
||||
distribution "wheezy"
|
||||
components ['all']
|
||||
key node['php-fpm']['dotdeb_repository']['key']
|
||||
action :add
|
||||
|
||||
3
cookbooks/php-fpm/recipes/test.rb
Normal file
3
cookbooks/php-fpm/recipes/test.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
include_recipe 'php-fpm::default'
|
||||
|
||||
package 'net-tools'
|
||||
Reference in New Issue
Block a user