diff options
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, } } |