From: Silvio Rhatto Date: Thu, 12 Apr 2018 15:58:52 +0000 (-0300) Subject: Adds apc class X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=4203f911b71ac593b8be3c3a22d36b89dc938767;p=puppet-php.git Adds apc class --- 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, }