Skip to content

CAT-1347 erb to epp conversion #2451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
415 changes: 218 additions & 197 deletions manifests/vhost.pp

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions templates/vhost/_action.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<%- if $action { -%>

Action <%= $action %> /cgi-bin virtual
<% } -%>
4 changes: 0 additions & 4 deletions templates/vhost/_action.erb

This file was deleted.

14 changes: 14 additions & 0 deletions templates/vhost/_aliases.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Alias declarations for resources outside the DocumentRoot
<%- $aliases.each |$alias_statement| { -%>
<%- if $alias_statement["path"] { -%>
<%- if $alias_statement["alias"] { -%>
Alias <%= $alias_statement["alias"] %> "<%= $alias_statement["path"] %>"
<%- }elsif $alias_statement["aliasmatch"] { -%>
AliasMatch <%= $alias_statement["aliasmatch"] %> "<%= $alias_statement["path"] %>"
<%- } elsif $alias_statement["scriptalias"] { -%>
ScriptAlias <%= $alias_statement["scriptalias"] %> "<%= $alias_statement["path"] %>"
<%- } elsif $alias_statement["scriptaliasmatch"] { -%>
ScriptAliasMatch <%= $alias_statement["scriptaliasmatch"] %> "<%= $alias_statement["path"] %>"
<%- } -%>
<%- } -%>
<%- } -%>
14 changes: 0 additions & 14 deletions templates/vhost/_aliases.erb

This file was deleted.

4 changes: 4 additions & 0 deletions templates/vhost/_allow_encoded_slashes.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<%- if $allow_encoded_slashes { -%>

AllowEncodedSlashes <%= $allow_encoded_slashes %>
<%- } -%>
4 changes: 0 additions & 4 deletions templates/vhost/_allow_encoded_slashes.erb

This file was deleted.

65 changes: 65 additions & 0 deletions templates/vhost/_auth_cas.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<%- if $cas_enabled { -%>
<%- if $cas_cookie_path { -%>
CASCookiePath <%= $cas_cookie_path %>
<%- } -%>
<%- if $cas_login_url { -%>
CASLoginURL <%= $cas_login_url %>
<%- } -%>
<%- if $cas_validate_url { -%>
CASValidateURL <%= $cas_validate_url %>
<%- } -%>
<%- if $cas_version { -%>
CASVersion <%= $cas_version %>
<%- } -%>
<%- if $cas_debug { -%>
CASDebug <%= $cas_debug %>
<%- } -%>
<%- if $cas_certificate_path { -%>
CASCertificatePath <%= $cas_certificate_path %>
<%- } -%>
<%- if $cas_proxy_validate_url { -%>
CASProxyValidateURL <%= $cas_proxy_validate_url %>
<%- } -%>
<%- if $cas_validate_depth { -%>
CASValidateDepth <%= $cas_validate_depth %>
<%- } -%>
<%- if $cas_root_proxied_as { -%>
CASRootProxiedAs <%= $cas_root_proxied_as %>
<%- } -%>
<%- if $cas_cookie_entropy { -%>
CASCookieEntropy <%= $cas_cookie_entropy %>
<%- } -%>
<%- if $cas_timeout { -%>
CASTimeout <%= $cas_timeout %>
<%- } -%>
<%- if $cas_idle_timeout { -%>
CASIdleTimeout <%= $cas_idle_timeout %>
<%- } -%>
<%- if $cas_cache_clean_interval { -%>
CASCacheCleanInterval <%= $cas_cache_clean_interval %>
<%- } -%>
<%- if $cas_cookie_domain { -%>
CASCookieDomain <%= $cas_cookie_domain %>
<%- } -%>
<%- if $cas_cookie_http_only { -%>
CASCookieHttpOnly <%= $cas_cookie_http_only %>
<%- } -%>
<%- if $cas_authoritative { -%>
CASAuthoritative <%= $cas_authoritative %>
<%- } -%>
<%- if $cas_sso_enabled { -%>
CASSSOEnabled On
<%- } -%>
<%- if $cas_validate_saml { -%>
CASValidateSAML On
<%- } -%>
<%- if $cas_attribute_prefix { -%>
CASAttributePrefix <%= $cas_attribute_prefix %>
<%- } -%>
<%- if $cas_attribute_delimiter { -%>
CASAttributeDelimiter <%= $cas_attribute_delimiter %>
<%- } -%>
<%- if $cas_scrub_request_headers { -%>
CASScrubRequestHeaders On
<%- } -%>
<%- } -%>
65 changes: 0 additions & 65 deletions templates/vhost/_auth_cas.erb

This file was deleted.

4 changes: 4 additions & 0 deletions templates/vhost/_charsets.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<%- if $add_default_charset { -%>

AddDefaultCharset <%= $add_default_charset %>
<% } -%>
4 changes: 0 additions & 4 deletions templates/vhost/_charsets.erb

This file was deleted.

5 changes: 5 additions & 0 deletions templates/vhost/_custom_fragment.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<%- if $custom_fragment { -%>

## Custom fragment
<%= $custom_fragment %>
<% } -%>
5 changes: 0 additions & 5 deletions templates/vhost/_custom_fragment.erb

This file was deleted.

8 changes: 8 additions & 0 deletions templates/vhost/_docroot.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

## Vhost docroot
<%- if $virtual_docroot { -%>
VirtualDocumentRoot "<%= $virtual_docroot %>"
<% } -%>
<%- if $docroot and ((! $virtual_docroot) or $virtual_use_default_docroot) { -%>
DocumentRoot "<%= $docroot %>"
<%- } -%>
8 changes: 0 additions & 8 deletions templates/vhost/_docroot.erb

This file was deleted.

4 changes: 4 additions & 0 deletions templates/vhost/_fallbackresource.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<%- if $fallbackresource { -%>

FallbackResource <%= $fallbackresource %>
<%- } -%>
4 changes: 0 additions & 4 deletions templates/vhost/_fallbackresource.erb

This file was deleted.

9 changes: 9 additions & 0 deletions templates/vhost/_file_footer.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<%- $define.each | $k, $v| { -%>
Undefine <%= $k %>
<% } -%>
</VirtualHost>
<%- if $passenger_pre_start { -%>
<%- [$passenger_pre_start].flatten().filter |$value| { $value }.each |$passenger_pre_start| { -%>
PassengerPreStart <%= $passenger_pre_start %>
<%- } -%>
<%- } -%>
9 changes: 0 additions & 9 deletions templates/vhost/_file_footer.erb

This file was deleted.

43 changes: 43 additions & 0 deletions templates/vhost/_file_header.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# ************************************
# Vhost template in module puppetlabs-apache
# Managed by Puppet
# ************************************
<%= [$comment].flatten.map |$c| { "# ${c}" }.join("\n") -%>
<%- if $mdomain { -%>

<%- if $mdomain =~ String { -%>

MDomain <%= $mdomain %>
<%-} else {-%>
MDomain <%= $servername %>
<%- } -%>
<% } -%>

<VirtualHost <%= [$nvh_addr_port].flatten().filter |$value| { $value }.join(' ') %>>
<% $define.each | $k, $v| { -%>
Define <%= $k %> <%= $v %>
<% } -%>
<% if $servername and !$servername.empty { -%>
ServerName <%= $servername %>
<% } -%>
<% if $serveradmin { -%>
ServerAdmin <%= $serveradmin %>
<% } -%>
<%- unless $protocols.empty { -%>
Protocols <%= join($protocols, ' ') %>
<%- } -%>
<%- unless $protocols_honor_order == undef { -%>
ProtocolsHonorOrder <%= apache::bool2httpd($protocols_honor_order) %>
<%- } -%>
<% if $limitreqfieldsize { -%>
LimitRequestFieldSize <%= $limitreqfieldsize %>
<% } -%>
<% if $limitreqfields { -%>
LimitRequestFields <%= $limitreqfields %>
<% } -%>
<% if $limitreqline { -%>
LimitRequestLine <%= $limitreqline %>
<% } -%>
<% if $limitreqbody { -%>
LimitRequestBody <%= $limitreqbody %>
<% } %>
42 changes: 0 additions & 42 deletions templates/vhost/_file_header.erb

This file was deleted.

8 changes: 8 additions & 0 deletions templates/vhost/_filters.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<%- unless $filters.empty { -%>

## Filter module rules
## as per http://httpd.apache.org/docs/2.4/mod/mod_filter.html
<%- $filters.each |$filter| { -%>
<%= $filter %>
<%- } -%>
<%- } -%>
8 changes: 0 additions & 8 deletions templates/vhost/_filters.erb

This file was deleted.

8 changes: 8 additions & 0 deletions templates/vhost/_header.epp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<% unless $headers.empty { -%>

## Header rules
## as per http://httpd.apache.org/docs/2.4/mod/mod_headers.html#header
<%- $headers.each |$header_statement| { -%>
Header <%= $header_statement %>
<%- } -%>
<% } -%>
8 changes: 0 additions & 8 deletions templates/vhost/_header.erb

This file was deleted.

Loading