Skip to content

Commit 11d06ef

Browse files
committed
(CAT-1346) erb_to_epp conversion for mod directory
1 parent 6588929 commit 11d06ef

File tree

136 files changed

+3044
-1237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+3044
-1237
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
314314

315315
### Added
316316

317-
- The default disk_cache.conf.erb caches everything. [#2142](https://github.com/puppetlabs/puppetlabs-apache/pull/2142) ([Pawa2NR](https://github.com/Pawa2NR))
317+
- The default disk_cache.conf.epp caches everything. [#2142](https://github.com/puppetlabs/puppetlabs-apache/pull/2142) ([Pawa2NR](https://github.com/Pawa2NR))
318318

319319
## [v6.2.0](https://github.com/puppetlabs/puppetlabs-apache/tree/v6.2.0) - 2021-05-24
320320

@@ -995,7 +995,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
995995
- (MODULES-2764) Enclose IPv6 addresses in square brackets [#1248](https://github.com/puppetlabs/puppetlabs-apache/pull/1248) ([Benedikt1992](https://github.com/Benedikt1992))
996996
- (MODULES-2757) Adding if around ServerName in template [#1237](https://github.com/puppetlabs/puppetlabs-apache/pull/1237) ([damonconway](https://github.com/damonconway))
997997
- (MODULES-2651) Default document root update for Ubuntu 14.04 and Debian 8 [#1235](https://github.com/puppetlabs/puppetlabs-apache/pull/1235) ([abednarik](https://github.com/abednarik))
998-
- Update mime.conf.erb to support dynamic AddHandler AddType AddOutputF… [#1232](https://github.com/puppetlabs/puppetlabs-apache/pull/1232) ([prabin5](https://github.com/prabin5))
998+
- Update mime.conf.epp to support dynamic AddHandler AddType AddOutputF… [#1232](https://github.com/puppetlabs/puppetlabs-apache/pull/1232) ([prabin5](https://github.com/prabin5))
999999
- #2544 Allow multiple IP addresses per vhost [#1229](https://github.com/puppetlabs/puppetlabs-apache/pull/1229) ([Benedikt1992](https://github.com/Benedikt1992))
10001000
- RewriteLock support [#1228](https://github.com/puppetlabs/puppetlabs-apache/pull/1228) ([wickedOne](https://github.com/wickedOne))
10011001
- (MODULES-2120) Allow empty docroot [#1224](https://github.com/puppetlabs/puppetlabs-apache/pull/1224) ([DavidS](https://github.com/DavidS))

REFERENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5983,7 +5983,7 @@ Data type: `String`
59835983

59845984
Path to template to use for configuring mod_rpaf.
59855985

5986-
Default value: `'apache/mod/rpaf.conf.erb'`
5986+
Default value: `'apache/mod/rpaf.conf.epp'`
59875987

59885988
### <a name="apache--mod--security"></a>`apache::mod::security`
59895989

manifests/mod.pp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,19 @@
114114
}
115115
}
116116

117+
$parameters = {
118+
'loadfiles' => $loadfiles,
119+
'_id' => $_id,
120+
'_path' => $_path,
121+
}
122+
117123
file { $_loadfile_name:
118124
ensure => file,
119125
path => "${mod_dir}/${_loadfile_name}",
120126
owner => 'root',
121127
group => $apache::params::root_group,
122128
mode => $apache::file_mode,
123-
content => template('apache/mod/load.erb'),
129+
content => epp('apache/mod/load.epp', $parameters),
124130
require => [
125131
Package['httpd'],
126132
Exec["mkdir ${mod_dir}"],

manifests/mod/alias.pp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,18 @@
2828
apache::mod { 'alias': }
2929

3030
# Template uses $icons_path
31+
$parameters = {
32+
'icons_prefix' => $icons_prefix,
33+
'icons_path' => $icons_path,
34+
'icons_options' => $icons_options,
35+
}
36+
3137
if $icons_path {
3238
file { 'alias.conf':
3339
ensure => file,
3440
path => "${apache::mod_dir}/alias.conf",
3541
mode => $apache::file_mode,
36-
content => template('apache/mod/alias.conf.erb'),
42+
content => epp('apache/mod/alias.conf.epp', $parameters),
3743
require => Exec["mkdir ${apache::mod_dir}"],
3844
before => File[$apache::mod_dir],
3945
notify => Class['apache::service'],

manifests/mod/auth_cas.pp

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,38 @@
126126
group => $apache::group,
127127
}
128128

129+
$parameters = {
130+
'cas_cookie_path' => $cas_cookie_path,
131+
'cas_login_url' => $cas_login_url,
132+
'cas_validate_url' => $cas_validate_url,
133+
'cas_version' => $cas_version,
134+
'cas_debug' => $cas_debug,
135+
'cas_certificate_path' => $cas_certificate_path,
136+
'cas_proxy_validate_url' => $cas_proxy_validate_url,
137+
'cas_validate_server' => $cas_validate_server,
138+
'cas_validate_depth' => $cas_validate_depth,
139+
'cas_root_proxied_as' => $cas_root_proxied_as,
140+
'cas_cookie_entropy' => $cas_cookie_entropy,
141+
'cas_timeout' => $cas_timeout,
142+
'cas_idle_timeout' => $cas_idle_timeout,
143+
'cas_cache_clean_interval' => $cas_cache_clean_interval,
144+
'cas_cookie_domain' => $cas_cookie_domain,
145+
'cas_cookie_http_only' => $cas_cookie_http_only,
146+
'cas_authoritative' => $cas_authoritative,
147+
'cas_sso_enabled' => $cas_sso_enabled,
148+
'cas_validate_saml' => $cas_validate_saml,
149+
'cas_attribute_prefix' => $cas_attribute_prefix,
150+
'cas_attribute_delimiter' => $cas_attribute_delimiter,
151+
'cas_scrub_request_headers' => $cas_scrub_request_headers,
152+
}
153+
129154
# Template uses
130155
# - All variables beginning with cas_
131156
file { 'auth_cas.conf':
132157
ensure => file,
133158
path => "${apache::mod_dir}/auth_cas.conf",
134159
mode => $apache::file_mode,
135-
content => template('apache/mod/auth_cas.conf.erb'),
160+
content => epp('apache/mod/auth_cas.conf.epp', $parameters),
136161
require => [Exec["mkdir ${apache::mod_dir}"],],
137162
before => File[$apache::mod_dir],
138163
notify => Class['Apache::Service'],

manifests/mod/auth_mellon.pp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,21 @@
3939

4040
# Template uses
4141
# - All variables beginning with mellon_
42+
$parameters = {
43+
'mellon_cache_size' => $mellon_cache_size,
44+
'mellon_cache_entry_size' => $mellon_cache_entry_size,
45+
'mellon_lock_file' => $mellon_lock_file,
46+
'mellon_post_directory' => $mellon_post_directory,
47+
'mellon_post_ttl' => $mellon_post_ttl,
48+
'mellon_post_size' => $mellon_post_size,
49+
'mellon_post_count' => $mellon_post_count,
50+
}
51+
4252
file { 'auth_mellon.conf':
4353
ensure => file,
4454
path => "${apache::mod_dir}/auth_mellon.conf",
4555
mode => $apache::file_mode,
46-
content => template('apache/mod/auth_mellon.conf.erb'),
56+
content => epp('apache/mod/auth_mellon.conf.epp', $parameters),
4757
require => [Exec["mkdir ${apache::mod_dir}"],],
4858
before => File[$apache::mod_dir],
4959
notify => Class['Apache::Service'],

manifests/mod/authn_dbd.pp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,24 @@
4545
include apache::mod::authn_core
4646
}
4747

48+
$parameters = {
49+
'authn_dbd_dbdriver' => $authn_dbd_dbdriver,
50+
'authn_dbd_params' => $authn_dbd_params,
51+
'authn_dbd_min' => $authn_dbd_min,
52+
'authn_dbd_max' => $authn_dbd_max,
53+
'authn_dbd_keep' => $authn_dbd_keep,
54+
'authn_dbd_exptime' => $authn_dbd_exptime,
55+
'authn_dbd_alias' => $authn_dbd_alias,
56+
'authn_dbd_query' => $authn_dbd_query,
57+
}
58+
4859
# Template uses
4960
# - All variables beginning with authn_dbd
5061
file { 'authn_dbd.conf':
5162
ensure => file,
5263
path => "${apache::mod_dir}/authn_dbd.conf",
5364
mode => $apache::file_mode,
54-
content => template('apache/mod/authn_dbd.conf.erb'),
65+
content => epp('apache/mod/authn_dbd.conf.epp', $parameters),
5566
require => [Exec["mkdir ${apache::mod_dir}"],],
5667
before => File[$apache::mod_dir],
5768
notify => Class['Apache::Service'],

manifests/mod/authnz_ldap.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
ensure => file,
2626
path => "${apache::mod_dir}/authnz_ldap.conf",
2727
mode => $apache::file_mode,
28-
content => template('apache/mod/authnz_ldap.conf.erb'),
28+
content => epp('apache/mod/authnz_ldap.conf.epp', { 'verify_server_cert' => $verify_server_cert, }),
2929
require => Exec["mkdir ${apache::mod_dir}"],
3030
before => File[$apache::mod_dir],
3131
notify => Class['apache::service'],

manifests/mod/autoindex.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
include apache
1313
::apache::mod { 'autoindex': }
1414

15-
# Determine icon filename suffix for autoindex.conf.erb
15+
# Determine icon filename suffix for autoindex.conf.epp
1616
case $facts['os']['name'] {
1717
'Debian', 'Ubuntu': {
1818
$icon_suffix = '-20x22'
@@ -26,7 +26,7 @@
2626
ensure => file,
2727
path => "${apache::mod_dir}/autoindex.conf",
2828
mode => $apache::file_mode,
29-
content => template('apache/mod/autoindex.conf.erb'),
29+
content => epp('apache/mod/autoindex.conf.epp', { 'icons_prefix' => $icons_prefix, 'icon_suffix' => $icon_suffix, }),
3030
require => Exec["mkdir ${apache::mod_dir}"],
3131
before => File[$apache::mod_dir],
3232
notify => Class['apache::service'],

manifests/mod/cgid.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
ensure => file,
3939
path => "${apache::mod_dir}/cgid.conf",
4040
mode => $apache::file_mode,
41-
content => template('apache/mod/cgid.conf.erb'),
41+
content => epp('apache/mod/cgid.conf.epp', { 'cgisock_path' => $cgisock_path }),
4242
require => Exec["mkdir ${apache::mod_dir}"],
4343
before => File[$apache::mod_dir],
4444
notify => Class['apache::service'],

0 commit comments

Comments
 (0)