Mercurial > repos > other > Puppet
diff modules/apache/manifests/mod.pp @ 275:d9352a684e62
Mass update of modules to remove deprecation warnings
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 26 Jan 2020 11:36:07 +0000 |
parents | 675c1cc61eaf |
children | b8d6ada284dd |
line wrap: on
line diff
--- a/modules/apache/manifests/mod.pp Sat Jan 04 11:42:45 2020 +0000 +++ b/modules/apache/manifests/mod.pp Sun Jan 26 11:36:07 2020 +0000 @@ -1,3 +1,37 @@ +# @summary +# Installs packages for an Apache module that doesn't have a corresponding +# `apache::mod::<MODULE NAME>` class. +# +# Checks for or places the module's default configuration files in the Apache server's +# `module` and `enable` directories. The default locations depend on your operating system. +# +# @param package +# **Required**.<br /> +# Names the package Puppet uses to install the Apache module. +# +# @param package_ensure +# Determines whether Puppet ensures the Apache module should be installed. +# +# @param lib +# Defines the module's shared object name. Do not configure manually without special reason. +# +# @param lib_path +# Specifies a path to the module's libraries. Do not manually set this parameter +# without special reason. The `path` parameter overrides this value. +# +# @param loadfile_name +# Sets the filename for the module's `LoadFile` directive, which can also set +# the module load order as Apache processes them in alphanumeric order. +# +# @param id +# Specifies the package id +# +# @param loadfiles +# Specifies an array of `LoadFile` directives. +# +# @param path +# Specifies a path to the module. Do not manually set this parameter without a special reason. +# define apache::mod ( $package = undef, $package_ensure = 'present', @@ -17,7 +51,7 @@ $mod_dir = $::apache::mod_dir # Determine if we have special lib - $mod_libs = $::apache::params::mod_libs + $mod_libs = $::apache::mod_libs if $lib { $_lib = $lib } elsif has_key($mod_libs, $mod) { # 2.6 compatibility hack @@ -46,11 +80,11 @@ } # Determine if we have a package - $mod_packages = $::apache::params::mod_packages + $mod_packages = $::apache::mod_packages if $package { $_package = $package } elsif has_key($mod_packages, $mod) { # 2.6 compatibility hack - if ($::apache::apache_version == '2.4' and $::operatingsystem =~ /^[Aa]mazon$/) { + if ($::apache::apache_version == '2.4' and $::operatingsystem =~ /^[Aa]mazon$/ and $::operatingsystemmajrelease != '2') { # On amazon linux we need to prefix our package name with mod24 instead of mod to support apache 2.4 $_package = regsubst($mod_packages[$mod],'^(mod_)?(.*)','mod24_\2') } else {