Skip to content

Commit

Permalink
params on php::fpm are not used jippi#81
Browse files Browse the repository at this point in the history
Making php::fpm a single installation entry point.
  • Loading branch information
schkovich committed Aug 23, 2014
1 parent 066c5ed commit ea1ead5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
6 changes: 4 additions & 2 deletions manifests/fpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@
service_name => $service_name,
ensure => $service_ensure,
enable => $service_enable,
has_status => $service_has_status
has_status => $service_has_status,
require => Package[$package]
}

php::fpm::config { 'php-fpm':
file => $inifile,
config => $settings
config => $settings,
require => Package[$package]
}

}
3 changes: 2 additions & 1 deletion manifests/fpm/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
$setting = undef,
$section = 'PHP',
$value = undef,
$service_name = $::php::fpm::params::service_name
) {
include ::php::fpm::params

Expand All @@ -44,7 +45,7 @@
section => $section,
setting => $setting,
value => $value,
notify => Service[$::php::fpm::params::service_name],
notify => Service[$service_name],
source => 'fpm',
}
}
6 changes: 3 additions & 3 deletions manifests/fpm/package.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class php::fpm::package(
$package_name = $php::fpm::params::package,
$package_ensure = $php::fpm::params::ensure,
$package_provider = $php::fpm::params::provider

This comment has been minimized.

Copy link
@joshbetz

joshbetz Feb 16, 2015

This breaks the module for me

==> default: Must pass package_provider to Class[Php::Fpm::Package] at /tmp/vagrant-puppet-3/modules-0/php/manifests/fpm/package.pp:5

This comment has been minimized.

Copy link
@schkovich

schkovich Feb 17, 2015

Author Owner

Odd. Default value (php5-fpm) is given in php::fpm::params on line 44. Could you give it a try using xdebug branch please. I was using the branch yesterday to spin up a Vagrant box and I did not bump into such problem.

This comment has been minimized.

Copy link
@schkovich

schkovich Feb 17, 2015

Author Owner

I enabled issue. If you prefer feel free to open an issue.

This comment has been minimized.

Copy link
@joshbetz

joshbetz Feb 17, 2015

The provider is not set: https://github.com/schkovich/puppet-php/blob/master/manifests/fpm/params.pp#L45 Maybe it's a different change that's breaking this.

This comment has been minimized.

Copy link
@schkovich

schkovich Feb 17, 2015

Author Owner

Ah, OK. I got it. Usually one does not have to set it up. Puppet would figure it out. The way I set it up it's mandatory. Let me see how I can tackle it. It's odd that I did not bump into that problem. On which platform are you? Ubuntu?

$package_name,
$package_ensure,
$package_provider
) {

package { $package_name:
Expand Down
13 changes: 6 additions & 7 deletions manifests/fpm/service.pp
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
class php::fpm::service(
$service_name = $php::fpm::params::service_name,
$ensure = $php::fpm::params::service_ensure,
$enable = $php::fpm::params::service_enable,
$has_status = $php::fpm::params::service_has_status
) inherits php::fpm::params {
$service_name,
$ensure,
$enable,
$has_status,
) {

service { $service_name:
ensure => $ensure,
enable => $enable,
restart => "service ${service_name} reload",
hasstatus => $has_status,
require => Package[$package]
hasstatus => $has_status
}

}

0 comments on commit ea1ead5

Please sign in to comment.