Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for ubuntu 16.04 via Ondrejs ppa #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ provisioner:

platforms:
- name: ubuntu-12.04
- name: ubuntu-16.04
- name: centos-6.4
- name: fedora-21

14 changes: 10 additions & 4 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -12,10 +12,16 @@
group = "www-data"
conf_dir = "/etc/php5/fpm/conf.d"
pool_conf_dir = "/etc/php5/fpm/pool.d"
if node.platform == "ubuntu" and node.platform_version.to_f <= 10.04
conf_file = "/etc/php5/fpm/php5-fpm.conf"
else
conf_file = "/etc/php5/fpm/php-fpm.conf"
if node.platform == "ubuntu"
if node.platform_version.to_f <= 10.04
conf_file = "/etc/php5/fpm/php5-fpm.conf"
elsif node.platform_version.to_f <= 16.04
conf_file = "/etc/php/5.6/fpm/php-fpm.conf"
pool_conf_dir = "/etc/php/5.6/fpm/pool.d"
default['php-fpm']['package_name'] = 'php5.6-fpm'
else
conf_file = "/etc/php5/fpm/php-fpm.conf"
end
end
error_log = "/var/log/php5-fpm.log"
pid ="/var/run/php5-fpm.pid"
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
license "Apache 2.0"
description "Installs/Configures php-fpm"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.7.6"
version "0.8.0"

depends "apt"
depends "yum", ">= 3.0"
8 changes: 6 additions & 2 deletions recipes/install.rb
Original file line number Diff line number Diff line change
@@ -43,8 +43,12 @@
end

service_provider = nil
if node['platform'] == 'ubuntu' and node['platform_version'].to_f >= 13.10
service_provider = ::Chef::Provider::Service::Upstart
if node['platform'] == 'ubuntu'
if node['platform_version'].to_f >= 15.10
service_provider = ::Chef::Provider::Service::Systemd
elsif node['platform_version'].to_f >= 13.10
service_provider = ::Chef::Provider::Service::Upstart
end
end

directory node['php-fpm']['log_dir']
13 changes: 11 additions & 2 deletions recipes/repository.rb
Original file line number Diff line number Diff line change
@@ -31,9 +31,18 @@
key "8D0DC64F"
action :add
end
# FIXME: apt-get update didn't trigger in above
execute "apt-get update"
elsif node['platform_version'].to_f <= 16.04
# Configure Ondrej's PPA
# We'll install php5.6-fpm from the Brian's PPA backports
apt_repository "ondrej" do
uri 'ppa:ondrej/php'
components ['main']
key '4F4EA0AAE5267A6C'
keyserver 'keyserver.ubuntu.com'
action :add
end
end
execute "apt-get update"
when 'debian'
# Configure Dotdeb repos
# TODO: move this to it's own 'dotdeb' cookbook?