aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-22 17:20:28 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-22 17:20:28 -0300
commitbcf5086deca96bf802a8fbf83aceca1b5a5135c3 (patch)
tree7b1f96f6696be531aa947740caacbd6c3e68ad46
parent5bccdacbc6882d0ac492cbdc8933b1ecfab353df (diff)
downloadpuppet-php-bcf5086deca96bf802a8fbf83aceca1b5a5135c3.tar.gz
puppet-php-bcf5086deca96bf802a8fbf83aceca1b5a5135c3.tar.bz2
Adds manage_mod_php
-rw-r--r--manifests/init.pp12
-rw-r--r--manifests/series5.pp11
-rw-r--r--manifests/series7.pp11
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" ]: