Skip to content

Commit

Permalink
Merge #113
Browse files Browse the repository at this point in the history
  • Loading branch information
Rockstar04 committed Jul 6, 2015
2 parents c35abf9 + 155245a commit aed6ac4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 6 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@
default['php']['ext_dir'] = "/usr/#{lib_dir}/php/modules"
if node['platform_version'].to_f < 6
default['php']['packages'] = %w(php53 php53-devel php53-cli php-pear)
default['php']['mysql']['package'] = 'php53-mysql'
else
default['php']['packages'] = %w(php php-devel php-cli php-pear)
default['php']['mysql']['package'] = 'php-mysql'
default['php']['fpm_package'] = 'php-fpm'
default['php']['fpm_pooldir'] = '/etc/php-fpm.d'
default['php']['fpm_default_conf'] = '/etc/php-fpm.d/www.conf'
Expand All @@ -60,6 +62,7 @@
default['php']['ext_conf_dir'] = '/etc/php5/conf.d'
end
default['php']['packages'] = %w(php5-cgi php5 php5-dev php5-cli php-pear)
default['php']['mysql']['package'] = 'php5-mysql'
default['php']['fpm_package'] = 'php5-fpm'
default['php']['fpm_pooldir'] = '/etc/php5/fpm/pool.d'
default['php']['fpm_user'] = 'www-data'
Expand All @@ -72,6 +75,7 @@
default['php']['fpm_user'] = 'wwwrun'
default['php']['fpm_group'] = 'www'
default['php']['packages'] = %w(apache2-mod_php5 php5-pear)
default['php']['mysql']['package'] = 'php5-mysql'
lib_dir = node['kernel']['machine'] =~ /x86_64/ ? 'lib64' : 'lib'
when 'windows'
default['php']['windows']['msi_name'] = 'PHP 5.3.28'
Expand All @@ -98,12 +102,14 @@
default['php']['fpm_user'] = 'www'
default['php']['fpm_group'] = 'www'
default['php']['packages'] = %w( php56 pear )
default['php']['mysql']['package'] = 'php56-mysqli'
else
default['php']['conf_dir'] = '/etc/php5/cli'
default['php']['ext_conf_dir'] = '/etc/php5/conf.d'
default['php']['fpm_user'] = 'www-data'
default['php']['fpm_group'] = 'www-data'
default['php']['packages'] = %w(php5-cgi php5 php5-dev php5-cli php-pear)
default['php']['mysql']['package'] = 'php5-mysql'
end

default['php']['url'] = 'http://us1.php.net/get'
Expand Down
10 changes: 1 addition & 9 deletions recipes/module_mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@
# limitations under the License.
#

pkg = value_for_platform(
%w(centos redhat scientific fedora amazon oracle) => {
el5_range => 'php53-mysql',
'default' => 'php-mysql'
},
'default' => 'php5-mysql'
)

package pkg do
package node['php']['mysql']['package'] do
action :install
end

0 comments on commit aed6ac4

Please sign in to comment.