diff --git a/manifests/apache2/install.pp b/manifests/apache2/install.pp index aef15a2..5e1c613 100644 --- a/manifests/apache2/install.pp +++ b/manifests/apache2/install.pp @@ -1,6 +1,6 @@ -class php::apache2::install { +class php::apache2::install ($version = 'present') { package { $php::params::apache_package_name: - ensure => present, + ensure => $version, notify => Service[$php::params::apache_service_name], } } diff --git a/manifests/fpm.pp b/manifests/fpm.pp index 096f0b3..0b7f75c 100644 --- a/manifests/fpm.pp +++ b/manifests/fpm.pp @@ -1,11 +1,16 @@ class php::fpm ( - $fpm_ini_content = undef, - $fpm_ini_source = undef, + $version = present, + $fpm_ini_content = undef, + $fpm_ini_source = undef, $fpm_conf_content = undef, - $fpm_conf_source = undef + $fpm_conf_source = undef ) { - include php - include php::fpm::install + class { 'php': + version => $version + } + class { 'php::fpm::install': + version => $version + } include php::fpm::config include php::fpm::service diff --git a/manifests/fpm/install.pp b/manifests/fpm/install.pp index fadb205..de4cbcc 100644 --- a/manifests/fpm/install.pp +++ b/manifests/fpm/install.pp @@ -1,6 +1,6 @@ -class php::fpm::install { +class php::fpm::install ($version = 'present') { package { $php::params::fpm_package_name: - ensure => present, + ensure => $version, require => Class['php'], } } diff --git a/manifests/init.pp b/manifests/init.pp index e93825b..f4433c8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,6 +1,11 @@ -class php( +class php ( + $version = 'present', $cli_ini_content = undef, $cli_ini_source = undef ) { - include php::params, php::install, php::config + class { 'php::params': } + class { 'php::install': + version => $version + } + class { 'php::config': } } diff --git a/manifests/install.pp b/manifests/install.pp index 5b812d5..eb6b1a6 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,5 +1,5 @@ -class php::install { +class php::install ($version = 'present') { package { $php::params::cli_package_name: - ensure => present, + ensure => $version, } } diff --git a/manifests/module.pp b/manifests/module.pp index 0049535..40475ff 100644 --- a/manifests/module.pp +++ b/manifests/module.pp @@ -1,5 +1,5 @@ define php::module( - $ensure = present, + $version = present, $package_prefix = 'php5-', $source = undef, $content = undef, @@ -20,7 +20,7 @@ } package { "php-${name}": - ensure => $ensure, + ensure => $version, name => "${package_prefix}${name}", require => $real_require, } @@ -42,7 +42,7 @@ } file { $file_name: - ensure => $ensure, + ensure => present, path => "${php::params::conf_dir}${file_name}", mode => '0644', owner => 'root',