Skip to content
This repository has been archived by the owner on Oct 11, 2018. It is now read-only.

Commit

Permalink
Merge pull request #91 from schkovich/master
Browse files Browse the repository at this point in the history
params on php::fpm are not used #81
  • Loading branch information
jippi committed Aug 29, 2014
2 parents 79ccf9d + 3994af5 commit 4c3d2ec
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 19 deletions.
30 changes: 22 additions & 8 deletions manifests/fpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,30 @@
# Copyright 2012-2013 Christian "Jippi" Winther, unless otherwise noted.
#
class php::fpm(
$ensure = $php::fpm::params::ensure,
$package = $php::fpm::params::package,
$provider = $php::fpm::params::provider,
$inifile = $php::fpm::params::inifile,
$settings = $php::fpm::params::settings,
$service_name = $php::fpm::params::service_name
$ensure = $php::fpm::params::ensure,
$package = $php::fpm::params::package,
$provider = $php::fpm::params::provider,
$inifile = $php::fpm::params::inifile,
$settings = $php::fpm::params::settings,
$service_name = $php::fpm::params::service_name,
$service_ensure = $php::fpm::params::service_ensure,
$service_enable = $php::fpm::params::service_enable,
$service_has_status = $php::fpm::params::service_has_status
) inherits php::fpm::params {

include php::fpm::package
include php::fpm::service
class { 'php::fpm::package':
package_name => $package,
package_ensure => $ensure,
package_provider => $provider
}

class { "php::fpm::service":
service_name => $service_name,
ensure => $service_ensure,
enable => $service_enable,
has_status => $service_has_status,
require => Package[$package]
}

php::fpm::config { 'php-fpm':
file => $inifile,
Expand Down
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
$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 4c3d2ec

Please sign in to comment.