diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-06-22 18:27:05 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-06-22 18:27:05 -0300 |
commit | 567d81c23d9a5f09658c09c3666d7a6f65b34f18 (patch) | |
tree | 92f9ec9e16db4c448b969feab383f0c73ae71df9 /manifests/init.pp | |
parent | bcf5086deca96bf802a8fbf83aceca1b5a5135c3 (diff) | |
download | puppet-php-567d81c23d9a5f09658c09c3666d7a6f65b34f18.tar.gz puppet-php-567d81c23d9a5f09658c09c3666d7a6f65b34f18.tar.bz2 |
Support multiple PHP series at the same time, currently only 5 and 7
Diffstat (limited to 'manifests/init.pp')
-rw-r--r-- | manifests/init.pp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index daed35f..3f1dbab 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -17,23 +17,29 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. class php( - $series = '5', + $series = [ '5', '7' ], $hardened = true, $apc = absent, $fpm = absent, $manage_mod_php = false, + $default_cli = '7' ) { - class { "php::series${series}": - hardened => $hardened, - manage_mod_php => $manage_mod_php, - } + include php::params - class { 'php::apc': - ensure => $apc, + $series.each |$item| { + class { "php::series${item}": + hardened => $hardened, + manage_mod_php => $manage_mod_php, + } + + php::fpm { "php-fpm-${item}": + series => $item, + ensure => $fpm, + } } - php::fpm { "php-fpm-${series}": + class { 'php::apc': series => $series, - ensure => $fpm, + ensure => $apc, } } |