diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-06-22 17:20:28 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-06-22 17:20:28 -0300 |
commit | bcf5086deca96bf802a8fbf83aceca1b5a5135c3 (patch) | |
tree | 7b1f96f6696be531aa947740caacbd6c3e68ad46 | |
parent | 5bccdacbc6882d0ac492cbdc8933b1ecfab353df (diff) | |
download | puppet-php-bcf5086deca96bf802a8fbf83aceca1b5a5135c3.tar.gz puppet-php-bcf5086deca96bf802a8fbf83aceca1b5a5135c3.tar.bz2 |
Adds manage_mod_php
-rw-r--r-- | manifests/init.pp | 12 | ||||
-rw-r--r-- | manifests/series5.pp | 11 | ||||
-rw-r--r-- | manifests/series7.pp | 11 |
3 files changed, 21 insertions, 13 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index b60d3df..daed35f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -17,13 +17,15 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. class php( - $series = '5', - $hardened = true, - $apc = absent, - $fpm = absent, + $series = '5', + $hardened = true, + $apc = absent, + $fpm = absent, + $manage_mod_php = false, ) { class { "php::series${series}": - hardened => $hardened, + hardened => $hardened, + manage_mod_php => $manage_mod_php, } class { 'php::apc': diff --git a/manifests/series5.pp b/manifests/series5.pp index 6bc8bbb..e39dd8b 100644 --- a/manifests/series5.pp +++ b/manifests/series5.pp @@ -1,5 +1,6 @@ class php::series5( - $hardened = true + $hardened = true, + $manage_mod_php = false, ) { case $::lsbdistcodename { 'xenial': { @@ -71,8 +72,10 @@ class php::series5( } # The needed apache modules - apache::module { "php${version}": - ensure => present, - require => Package["libapache2-mod-php${version}"], + if $manage_mod_php == true { + apache::module { "php${version}": + ensure => present, + require => Package["libapache2-mod-php${version}"], + } } } diff --git a/manifests/series7.pp b/manifests/series7.pp index 1275784..38b82d1 100644 --- a/manifests/series7.pp +++ b/manifests/series7.pp @@ -1,5 +1,6 @@ class php::series7( - $hardened = true + $hardened = true, + $manage_mod_php = false, ) { case $::lsbdistcodename { 'xenial': { @@ -25,9 +26,11 @@ class php::series7( } # The needed apache modules - apache::module { "php${version}": - ensure => present, - require => Package["libapache2-mod-php${version}"], + if $manage_mod_php == true { + apache::module { "php${version}": + ensure => present, + require => Package["libapache2-mod-php${version}"], + } } file { [ "${folder}", "${folder}/cli", "${folder}/apache2", "${folder}/cli/conf.d", "${folder}/apache2/conf.d" ]: |