Mercurial > repos > other > Puppet
annotate modules/apache/manifests/mod/authn_dbd.pp @ 482:d83de9b3a62b default tip
Update hiera.yaml within Puppet config
Forgot that we manage it from here. Now has content to match
new packages
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 30 Aug 2024 16:10:36 +0100 |
parents | adf6fe9bbc17 |
children |
rev | line source |
---|---|
275
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
1 # @summary |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
2 # Installs `mod_authn_dbd`. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
3 # |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
4 # @param authn_dbd_params |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
5 # The params needed for the mod to function. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
6 # |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
7 # @param authn_dbd_dbdriver |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
8 # Selects an apr_dbd driver by name. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
9 # |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
10 # @param authn_dbd_query |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
11 # |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
12 # @param authn_dbd_min |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
13 # Set the minimum number of connections per process. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
14 # |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
15 # @param authn_dbd_max |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
16 # Set the maximum number of connections per process. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
17 # |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
18 # @param authn_dbd_keep |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
19 # Set the maximum number of connections per process to be sustained. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
20 # |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
21 # @param authn_dbd_exptime |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
22 # Set the time to keep idle connections alive when the number of |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
23 # connections specified in DBDKeep has been exceeded. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
24 # |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
25 # @param authn_dbd_alias |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
26 # Sets an alias for `AuthnProvider. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
27 # |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
28 # @see https://httpd.apache.org/docs/current/mod/mod_authn_dbd.html for additional documentation. |
d9352a684e62
Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents:
257
diff
changeset
|
29 # |
257
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
30 class apache::mod::authn_dbd ( |
437
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
31 Optional[String] $authn_dbd_params, |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
32 String $authn_dbd_dbdriver = 'mysql', |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
33 Optional[String] $authn_dbd_query = undef, |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
34 Integer $authn_dbd_min = 4, |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
35 Integer $authn_dbd_max = 20, |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
36 Integer $authn_dbd_keep = 8, |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
37 Integer $authn_dbd_exptime = 300, |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
38 Optional[String] $authn_dbd_alias = undef, |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
39 ) inherits apache::params { |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
40 include apache |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
41 include apache::mod::dbd |
257
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
42 ::apache::mod { 'authn_dbd': } |
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
43 |
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
44 if $authn_dbd_alias { |
437
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
45 include apache::mod::authn_core |
257
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
46 } |
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
47 |
478
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
48 $parameters = { |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
49 'authn_dbd_dbdriver' => $authn_dbd_dbdriver, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
50 'authn_dbd_params' => $authn_dbd_params, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
51 'authn_dbd_min' => $authn_dbd_min, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
52 'authn_dbd_max' => $authn_dbd_max, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
53 'authn_dbd_keep' => $authn_dbd_keep, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
54 'authn_dbd_exptime' => $authn_dbd_exptime, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
55 'authn_dbd_alias' => $authn_dbd_alias, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
56 'authn_dbd_query' => $authn_dbd_query, |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
57 } |
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
58 |
257
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
59 # Template uses |
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
60 # - All variables beginning with authn_dbd |
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
61 file { 'authn_dbd.conf': |
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
62 ensure => file, |
437
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
63 path => "${apache::mod_dir}/authn_dbd.conf", |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
64 mode => $apache::file_mode, |
478
adf6fe9bbc17
Update Puppet modules to latest versions
IBBoard <dev@ibboard.co.uk>
parents:
437
diff
changeset
|
65 content => epp('apache/mod/authn_dbd.conf.epp', $parameters), |
437
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
66 require => [Exec["mkdir ${apache::mod_dir}"],], |
b8d6ada284dd
Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents:
275
diff
changeset
|
67 before => File[$apache::mod_dir], |
257
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
68 notify => Class['Apache::Service'], |
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
69 } |
675c1cc61eaf
Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
70 } |