Skip to content

Commit

Permalink
support for Fedora 21
Browse files Browse the repository at this point in the history
  • Loading branch information
Cory Wynn authored and yevgenko committed Mar 29, 2015
1 parent 1bd116a commit 65bad64
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .kitchen.yml
Expand Up @@ -8,6 +8,7 @@ provisioner:
platforms:
- name: ubuntu-12.04
- name: centos-6.4
- name: fedora-21

suites:
- name: default
Expand Down
12 changes: 9 additions & 3 deletions attributes/default.rb
@@ -1,4 +1,5 @@
if node.platform_family == "rhel"
case node["platform_family"]
when "rhel", "fedora"
user = "apache"
group = "apache"
conf_dir = "/etc/php.d"
Expand Down Expand Up @@ -42,8 +43,13 @@
default['php-fpm']['installation_action'] = :install
default['php-fpm']['version'] = nil

default['php-fpm']['yum_url'] = "http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/"
default['php-fpm']['yum_mirrorlist'] = "http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror"
case node["platform_family"]
when "rhel"
default['php-fpm']['yum_url'] = "http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/"
default['php-fpm']['yum_mirrorlist'] = "http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror"
when "fedora"
default['php-fpm']['skip_repository_install'] = true
end

default['php-fpm']['dotdeb_repository']['uri'] = "http://packages.dotdeb.org"
default['php-fpm']['dotdeb_repository']['key'] = "http://www.dotdeb.org/dotdeb.gpg"
Expand Down
2 changes: 1 addition & 1 deletion recipes/install.rb
Expand Up @@ -22,7 +22,7 @@
include_recipe 'apt::default' if node['platform_family'] == 'debian'

if node['php-fpm']['package_name'].nil?
if platform_family?("rhel")
if platform_family?("rhel", "fedora")
php_fpm_package_name = "php-fpm"
else
php_fpm_package_name = "php5-fpm"
Expand Down

0 comments on commit 65bad64

Please sign in to comment.