diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-04-12 12:58:52 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-04-12 12:58:52 -0300 |
commit | 4203f911b71ac593b8be3c3a22d36b89dc938767 (patch) | |
tree | bf60b6c2cb18c4625995e55e428e4df670e61352 /manifests | |
parent | 5463cc3ce5ad481b6f72cebd20c40af8017848c1 (diff) | |
download | puppet-php-4203f911b71ac593b8be3c3a22d36b89dc938767.tar.gz puppet-php-4203f911b71ac593b8be3c3a22d36b89dc938767.tar.bz2 |
Adds apc class
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/apc.pp | 20 | ||||
-rw-r--r-- | manifests/init.pp | 2 |
2 files changed, 21 insertions, 1 deletions
diff --git a/manifests/apc.pp b/manifests/apc.pp new file mode 100644 index 0000000..634f544 --- /dev/null +++ b/manifests/apc.pp @@ -0,0 +1,20 @@ +class php::apc( + $ensure = 'present', +) { + $fpm = $::php::fpm + + if $series == '5' { + $version = $::php::series5::version + } + else { + $version = $::php::series7::version + } + + package { [ 'php-apcu', 'php-apcu-bc' ]: + ensure => $ensure, + notify => $fpm ? { + 'present' => Service["php${version}-fpm"], + default => undef, + }, + } +} diff --git a/manifests/init.pp b/manifests/init.pp index 39d07e8..c0d42a1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -26,7 +26,7 @@ class php( hardened => $hardened, } - package { [ 'php-apcu', 'php-apcu-bc' ]: + class { 'php::apc': ensure => $apc, } |