view modules/apache/manifests/mod/authnz_ldap.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 source

# @summary
#   Installs `mod_authnz_ldap`.
# 
# @param verify_server_cert
#   Whether to force te verification of a server cert or not.
# 
# @param package_name
#   The name of the ldap package.
# 
# @see https://httpd.apache.org/docs/current/mod/mod_authnz_ldap.html for additional documentation.
#
class apache::mod::authnz_ldap (
  Boolean $verify_server_cert = true,
  $package_name               = undef,
) {

  include ::apache
  include '::apache::mod::ldap'
  ::apache::mod { 'authnz_ldap':
    package => $package_name,
  }

  # Template uses:
  # - $verify_server_cert
  file { 'authnz_ldap.conf':
    ensure  => file,
    path    => "${::apache::mod_dir}/authnz_ldap.conf",
    mode    => $::apache::file_mode,
    content => template('apache/mod/authnz_ldap.conf.erb'),
    require => Exec["mkdir ${::apache::mod_dir}"],
    before  => File[$::apache::mod_dir],
    notify  => Class['apache::service'],
  }
}