Skip to content

Commit 9c73e67

Browse files
authored
Merge pull request #2451 from puppetlabs/CAT-1347-erb-to-epp-conversion-vhost-files
CAT-1347 erb to epp conversion
2 parents 79af947 + 31a137b commit 9c73e67

Some content is hidden

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

57 files changed

+827
-807
lines changed

manifests/vhost.pp

Lines changed: 218 additions & 197 deletions
Large diffs are not rendered by default.

templates/vhost/_action.epp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<%- if $action { -%>
2+
3+
Action <%= $action %> /cgi-bin virtual
4+
<% } -%>

templates/vhost/_action.erb

Lines changed: 0 additions & 4 deletions
This file was deleted.

templates/vhost/_aliases.epp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Alias declarations for resources outside the DocumentRoot
2+
<%- $aliases.each |$alias_statement| { -%>
3+
<%- if $alias_statement["path"] { -%>
4+
<%- if $alias_statement["alias"] { -%>
5+
Alias <%= $alias_statement["alias"] %> "<%= $alias_statement["path"] %>"
6+
<%- }elsif $alias_statement["aliasmatch"] { -%>
7+
AliasMatch <%= $alias_statement["aliasmatch"] %> "<%= $alias_statement["path"] %>"
8+
<%- } elsif $alias_statement["scriptalias"] { -%>
9+
ScriptAlias <%= $alias_statement["scriptalias"] %> "<%= $alias_statement["path"] %>"
10+
<%- } elsif $alias_statement["scriptaliasmatch"] { -%>
11+
ScriptAliasMatch <%= $alias_statement["scriptaliasmatch"] %> "<%= $alias_statement["path"] %>"
12+
<%- } -%>
13+
<%- } -%>
14+
<%- } -%>

templates/vhost/_aliases.erb

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<%- if $allow_encoded_slashes { -%>
2+
3+
AllowEncodedSlashes <%= $allow_encoded_slashes %>
4+
<%- } -%>

templates/vhost/_allow_encoded_slashes.erb

Lines changed: 0 additions & 4 deletions
This file was deleted.

templates/vhost/_auth_cas.epp

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<%- if $cas_enabled { -%>
2+
<%- if $cas_cookie_path { -%>
3+
CASCookiePath <%= $cas_cookie_path %>
4+
<%- } -%>
5+
<%- if $cas_login_url { -%>
6+
CASLoginURL <%= $cas_login_url %>
7+
<%- } -%>
8+
<%- if $cas_validate_url { -%>
9+
CASValidateURL <%= $cas_validate_url %>
10+
<%- } -%>
11+
<%- if $cas_version { -%>
12+
CASVersion <%= $cas_version %>
13+
<%- } -%>
14+
<%- if $cas_debug { -%>
15+
CASDebug <%= $cas_debug %>
16+
<%- } -%>
17+
<%- if $cas_certificate_path { -%>
18+
CASCertificatePath <%= $cas_certificate_path %>
19+
<%- } -%>
20+
<%- if $cas_proxy_validate_url { -%>
21+
CASProxyValidateURL <%= $cas_proxy_validate_url %>
22+
<%- } -%>
23+
<%- if $cas_validate_depth { -%>
24+
CASValidateDepth <%= $cas_validate_depth %>
25+
<%- } -%>
26+
<%- if $cas_root_proxied_as { -%>
27+
CASRootProxiedAs <%= $cas_root_proxied_as %>
28+
<%- } -%>
29+
<%- if $cas_cookie_entropy { -%>
30+
CASCookieEntropy <%= $cas_cookie_entropy %>
31+
<%- } -%>
32+
<%- if $cas_timeout { -%>
33+
CASTimeout <%= $cas_timeout %>
34+
<%- } -%>
35+
<%- if $cas_idle_timeout { -%>
36+
CASIdleTimeout <%= $cas_idle_timeout %>
37+
<%- } -%>
38+
<%- if $cas_cache_clean_interval { -%>
39+
CASCacheCleanInterval <%= $cas_cache_clean_interval %>
40+
<%- } -%>
41+
<%- if $cas_cookie_domain { -%>
42+
CASCookieDomain <%= $cas_cookie_domain %>
43+
<%- } -%>
44+
<%- if $cas_cookie_http_only { -%>
45+
CASCookieHttpOnly <%= $cas_cookie_http_only %>
46+
<%- } -%>
47+
<%- if $cas_authoritative { -%>
48+
CASAuthoritative <%= $cas_authoritative %>
49+
<%- } -%>
50+
<%- if $cas_sso_enabled { -%>
51+
CASSSOEnabled On
52+
<%- } -%>
53+
<%- if $cas_validate_saml { -%>
54+
CASValidateSAML On
55+
<%- } -%>
56+
<%- if $cas_attribute_prefix { -%>
57+
CASAttributePrefix <%= $cas_attribute_prefix %>
58+
<%- } -%>
59+
<%- if $cas_attribute_delimiter { -%>
60+
CASAttributeDelimiter <%= $cas_attribute_delimiter %>
61+
<%- } -%>
62+
<%- if $cas_scrub_request_headers { -%>
63+
CASScrubRequestHeaders On
64+
<%- } -%>
65+
<%- } -%>

templates/vhost/_auth_cas.erb

Lines changed: 0 additions & 65 deletions
This file was deleted.

templates/vhost/_charsets.epp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<%- if $add_default_charset { -%>
2+
3+
AddDefaultCharset <%= $add_default_charset %>
4+
<% } -%>

templates/vhost/_charsets.erb

Lines changed: 0 additions & 4 deletions
This file was deleted.

templates/vhost/_custom_fragment.epp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<%- if $custom_fragment { -%>
2+
3+
## Custom fragment
4+
<%= $custom_fragment %>
5+
<% } -%>

templates/vhost/_custom_fragment.erb

Lines changed: 0 additions & 5 deletions
This file was deleted.

templates/vhost/_docroot.epp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
## Vhost docroot
3+
<%- if $virtual_docroot { -%>
4+
VirtualDocumentRoot "<%= $virtual_docroot %>"
5+
<% } -%>
6+
<%- if $docroot and ((! $virtual_docroot) or $virtual_use_default_docroot) { -%>
7+
DocumentRoot "<%= $docroot %>"
8+
<%- } -%>

templates/vhost/_docroot.erb

Lines changed: 0 additions & 8 deletions
This file was deleted.

templates/vhost/_fallbackresource.epp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<%- if $fallbackresource { -%>
2+
3+
FallbackResource <%= $fallbackresource %>
4+
<%- } -%>

templates/vhost/_fallbackresource.erb

Lines changed: 0 additions & 4 deletions
This file was deleted.

templates/vhost/_file_footer.epp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<%- $define.each | $k, $v| { -%>
2+
Undefine <%= $k %>
3+
<% } -%>
4+
</VirtualHost>
5+
<%- if $passenger_pre_start { -%>
6+
<%- [$passenger_pre_start].flatten().filter |$value| { $value }.each |$passenger_pre_start| { -%>
7+
PassengerPreStart <%= $passenger_pre_start %>
8+
<%- } -%>
9+
<%- } -%>

templates/vhost/_file_footer.erb

Lines changed: 0 additions & 9 deletions
This file was deleted.

templates/vhost/_file_header.epp

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# ************************************
2+
# Vhost template in module puppetlabs-apache
3+
# Managed by Puppet
4+
# ************************************
5+
<%= [$comment].flatten.map |$c| { "# ${c}" }.join("\n") -%>
6+
<%- if $mdomain { -%>
7+
8+
<%- if $mdomain =~ String { -%>
9+
10+
MDomain <%= $mdomain %>
11+
<%-} else {-%>
12+
MDomain <%= $servername %>
13+
<%- } -%>
14+
<% } -%>
15+
16+
<VirtualHost <%= [$nvh_addr_port].flatten().filter |$value| { $value }.join(' ') %>>
17+
<% $define.each | $k, $v| { -%>
18+
Define <%= $k %> <%= $v %>
19+
<% } -%>
20+
<% if $servername and !$servername.empty { -%>
21+
ServerName <%= $servername %>
22+
<% } -%>
23+
<% if $serveradmin { -%>
24+
ServerAdmin <%= $serveradmin %>
25+
<% } -%>
26+
<%- unless $protocols.empty { -%>
27+
Protocols <%= join($protocols, ' ') %>
28+
<%- } -%>
29+
<%- unless $protocols_honor_order == undef { -%>
30+
ProtocolsHonorOrder <%= apache::bool2httpd($protocols_honor_order) %>
31+
<%- } -%>
32+
<% if $limitreqfieldsize { -%>
33+
LimitRequestFieldSize <%= $limitreqfieldsize %>
34+
<% } -%>
35+
<% if $limitreqfields { -%>
36+
LimitRequestFields <%= $limitreqfields %>
37+
<% } -%>
38+
<% if $limitreqline { -%>
39+
LimitRequestLine <%= $limitreqline %>
40+
<% } -%>
41+
<% if $limitreqbody { -%>
42+
LimitRequestBody <%= $limitreqbody %>
43+
<% } %>

templates/vhost/_file_header.erb

Lines changed: 0 additions & 42 deletions
This file was deleted.

templates/vhost/_filters.epp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<%- unless $filters.empty { -%>
2+
3+
## Filter module rules
4+
## as per http://httpd.apache.org/docs/2.4/mod/mod_filter.html
5+
<%- $filters.each |$filter| { -%>
6+
<%= $filter %>
7+
<%- } -%>
8+
<%- } -%>

templates/vhost/_filters.erb

Lines changed: 0 additions & 8 deletions
This file was deleted.

templates/vhost/_header.epp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<% unless $headers.empty { -%>
2+
3+
## Header rules
4+
## as per http://httpd.apache.org/docs/2.4/mod/mod_headers.html#header
5+
<%- $headers.each |$header_statement| { -%>
6+
Header <%= $header_statement %>
7+
<%- } -%>
8+
<% } -%>

templates/vhost/_header.erb

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)