Skip to content

Commit ffbcb58

Browse files
committed
(CAT-1346) erb_to_epp conversion for mod directory
1 parent 2ea8841 commit ffbcb58

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'],

manifests/mod/cluster.pp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,24 @@
7575
::apache::mod { 'slotmem': }
7676
}
7777

78+
$parameters = {
79+
'ip' => $ip,
80+
'port' => $port,
81+
'allowed_network' => $allowed_network,
82+
'keep_alive_timeout' => $keep_alive_timeout,
83+
'max_keep_alive_requests' => $max_keep_alive_requests,
84+
'enable_mcpm_receive' => $enable_mcpm_receive,
85+
'balancer_name' => $balancer_name,
86+
'server_advertise' => $server_advertise,
87+
'advertise_frequency' => $advertise_frequency,
88+
'manager_allowed_network' => $manager_allowed_network,
89+
}
90+
7891
file { 'cluster.conf':
7992
ensure => file,
8093
path => "${apache::mod_dir}/cluster.conf",
8194
mode => $apache::file_mode,
82-
content => template('apache/mod/cluster.conf.erb'),
95+
content => epp('apache/mod/cluster.conf.epp', $parameters),
8396
require => Exec["mkdir ${apache::mod_dir}"],
8497
before => File[$apache::mod_dir],
8598
notify => Class['apache::service'],

manifests/mod/dav_fs.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
ensure => file,
2020
path => "${apache::mod_dir}/dav_fs.conf",
2121
mode => $apache::file_mode,
22-
content => template('apache/mod/dav_fs.conf.erb'),
22+
content => epp('apache/mod/dav_fs.conf.epp', { 'dav_lock' => $dav_lock }),
2323
require => Exec["mkdir ${apache::mod_dir}"],
2424
before => File[$apache::mod_dir],
2525
notify => Class['apache::service'],

manifests/mod/deflate.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
ensure => file,
3131
path => "${apache::mod_dir}/deflate.conf",
3232
mode => $apache::file_mode,
33-
content => template('apache/mod/deflate.conf.erb'),
33+
content => epp('apache/mod/deflate.conf.epp', { 'types' => $types, 'notes' => $notes, }),
3434
require => Exec["mkdir ${apache::mod_dir}"],
3535
before => File[$apache::mod_dir],
3636
notify => Class['apache::service'],

manifests/mod/dir.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
ensure => file,
3333
path => "${apache::mod_dir}/dir.conf",
3434
mode => $apache::file_mode,
35-
content => template('apache/mod/dir.conf.erb'),
35+
content => epp('apache/mod/dir.conf.epp', { 'indexes' => $indexes }),
3636
require => Exec["mkdir ${apache::mod_dir}"],
3737
before => File[$apache::mod_dir],
3838
notify => Class['apache::service'],

manifests/mod/disk_cache.pp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,18 @@
4141

4242
Class['apache::mod::cache'] -> Class['apache::mod::disk_cache']
4343

44+
$parameters = {
45+
'default_cache_enable' => $default_cache_enable,
46+
'_cache_root' => $_cache_root,
47+
'cache_ignore_headers' => $cache_ignore_headers,
48+
}
49+
4450
# Template uses $_cache_root
4551
file { 'disk_cache.conf':
4652
ensure => file,
4753
path => "${apache::mod_dir}/disk_cache.conf",
4854
mode => $apache::file_mode,
49-
content => template('apache/mod/disk_cache.conf.erb'),
55+
content => epp('apache/mod/disk_cache.conf.epp', $parameters),
5056
require => Exec["mkdir ${apache::mod_dir}"],
5157
before => File[$apache::mod_dir],
5258
notify => Class['apache::service'],

manifests/mod/dumpio.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
ensure => file,
3131
path => "${apache::mod_dir}/dumpio.conf",
3232
mode => $apache::file_mode,
33-
content => template('apache/mod/dumpio.conf.erb'),
33+
content => epp('apache/mod/dumpio.conf.epp', { 'dump_io_input' => $dump_io_input, 'dump_io_output' => $dump_io_output, }),
3434
require => Exec["mkdir ${apache::mod_dir}"],
3535
before => File[$apache::mod_dir],
3636
notify => Class['apache::service'],

manifests/mod/event.pp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,22 @@
7474
# - $maxsparethreads
7575
# - $threadsperchild
7676
# - $serverlimit
77+
$parameters = {
78+
'serverlimit' => $serverlimit,
79+
'startservers' => $startservers,
80+
'maxrequestworkers' => $maxrequestworkers,
81+
'minsparethreads' => $minsparethreads,
82+
'maxsparethreads' => $maxsparethreads,
83+
'threadsperchild' => $threadsperchild,
84+
'maxconnectionsperchild' => $maxconnectionsperchild,
85+
'threadlimit' => $threadlimit,
86+
'listenbacklog' => $listenbacklog,
87+
}
88+
7789
file { "${apache::mod_dir}/event.conf":
7890
ensure => file,
7991
mode => $apache::file_mode,
80-
content => template('apache/mod/event.conf.erb'),
92+
content => epp('apache/mod/event.conf.epp', $parameters),
8193
require => Exec["mkdir ${apache::mod_dir}"],
8294
before => File[$apache::mod_dir],
8395
notify => Class['apache::service'],

manifests/mod/expires.pp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@
2626
# $expires_active
2727
# $expires_default
2828
# $expires_by_type
29+
$parameters = {
30+
'expires_active' => $expires_active,
31+
'expires_default' => $expires_default,
32+
'expires_by_type' => $expires_by_type,
33+
}
34+
2935
file { 'expires.conf':
3036
ensure => file,
3137
path => "${apache::mod_dir}/expires.conf",
3238
mode => $apache::file_mode,
33-
content => template('apache/mod/expires.conf.erb'),
39+
content => epp('apache/mod/expires.conf.epp', $parameters),
3440
require => Exec["mkdir ${apache::mod_dir}"],
3541
before => File[$apache::mod_dir],
3642
notify => Class['apache::service'],

manifests/mod/ext_filter.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
ensure => file,
3030
path => "${apache::mod_dir}/ext_filter.conf",
3131
mode => $apache::file_mode,
32-
content => template('apache/mod/ext_filter.conf.erb'),
32+
content => epp('apache/mod/ext_filter.conf.epp', { 'ext_filter_define' => $ext_filter_define, }),
3333
require => [Exec["mkdir ${apache::mod_dir}"],],
3434
before => File[$apache::mod_dir],
3535
notify => Class['Apache::Service'],

manifests/mod/fcgid.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
ensure => file,
5858
path => "${apache::mod_dir}/${conf_name}",
5959
mode => $apache::file_mode,
60-
content => template('apache/mod/fcgid.conf.erb'),
60+
content => epp('apache/mod/fcgid.conf.epp', { 'options' => $options, }),
6161
require => Exec["mkdir ${apache::mod_dir}"],
6262
before => File[$apache::mod_dir],
6363
notify => Class['apache::service'],

manifests/mod/geoip.pp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,22 @@
4949
# - scan_proxy_headers
5050
# - scan_proxy_header_field
5151
# - use_last_xforwarededfor_ip
52+
$parameters = {
53+
'enable' => $enable,
54+
'db_file' => $db_file,
55+
'flag' => $flag,
56+
'output' => $output,
57+
'enable_utf8' => $enable_utf8,
58+
'scan_proxy_headers' => $scan_proxy_headers,
59+
'scan_proxy_header_field' => $scan_proxy_header_field,
60+
'use_last_xforwarededfor_ip' => $use_last_xforwarededfor_ip,
61+
}
62+
5263
file { 'geoip.conf':
5364
ensure => file,
5465
path => "${apache::mod_dir}/geoip.conf",
5566
mode => $apache::file_mode,
56-
content => template('apache/mod/geoip.conf.erb'),
67+
content => epp('apache/mod/geoip.conf.epp', $parameters),
5768
require => Exec["mkdir ${apache::mod_dir}"],
5869
before => File[$apache::mod_dir],
5970
notify => Class['apache::service'],

manifests/mod/http2.pp

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,30 @@
8585
include apache
8686
apache::mod { 'http2': }
8787

88+
$parameters = {
89+
'h2_copy_files' => $h2_copy_files,
90+
'h2_direct' => $h2_direct,
91+
'h2_early_hints' => $h2_early_hints,
92+
'h2_max_session_streams' => $h2_max_session_streams,
93+
'h2_max_worker_idle_seconds' => $h2_max_worker_idle_seconds,
94+
'h2_max_workers' => $h2_max_workers,
95+
'h2_min_workers' => $h2_min_workers,
96+
'h2_modern_tls_only' => $h2_modern_tls_only,
97+
'h2_push' => $h2_push,
98+
'h2_push_diary_size' => $h2_push_diary_size,
99+
'h2_push_priority' => $h2_push_priority,
100+
'h2_push_resource' => $h2_push_resource,
101+
'h2_serialize_headers' => $h2_serialize_headers,
102+
'h2_stream_max_mem_size' => $h2_stream_max_mem_size,
103+
'h2_tls_cool_down_secs' => $h2_tls_cool_down_secs,
104+
'h2_tls_warm_up_size' => $h2_tls_warm_up_size,
105+
'h2_upgrade' => $h2_upgrade,
106+
'h2_window_size' => $h2_window_size,
107+
}
108+
88109
file { 'http2.conf':
89110
ensure => file,
90-
content => template('apache/mod/http2.conf.erb'),
111+
content => epp('apache/mod/http2.conf.epp', $parameters),
91112
mode => $apache::file_mode,
92113
path => "${apache::mod_dir}/http2.conf",
93114
owner => $apache::params::user,

0 commit comments

Comments
 (0)