Add templates from puppet converted to jinja

This commit is contained in:
Pierre-Yves Chibon 2014-12-07 17:01:01 +00:00
parent a8c5dc6742
commit 9b74b668e0
13 changed files with 79 additions and 0 deletions

View file

@ -0,0 +1,2 @@
RewriteEngine On
RewriteRule ^{{ path }}/((?:app|bapp|proxy|fas|koji|puppet|hosted|people|torrent|secondary|cvs)\d*)$ http://$1/apache-status [P,L]

View file

@ -0,0 +1,3 @@
Header set AppTime "%D"
PassEnv HOSTNAME
Header set AppServer "{{ fqdn }}"

View file

@ -0,0 +1,3 @@
Header set KojiTime "%D"
PassEnv HOSTNAME
Header set KojiServer "{{ fqdn }}"

View file

@ -0,0 +1,2 @@
CustomLog "logs/{{ name }}-access.log" combined
ErrorLog "logs/{{ name }}-error.log"

View file

@ -0,0 +1,4 @@
ProxyPass {{ iconpath }} {{ proxyurl }}/icons
ProxyPassReverse {{ iconpath }} {{ proxyurl }}/icons
ProxyPass {{ path }} {{ proxyurl }}/mailman
ProxyPassReverse {{ path }} {{ proxyurl }}/mailman

View file

@ -0,0 +1 @@
AddType {{ mimetype }} <% extensions.each do |ext| -}} {{ ext }} <% end -}}

View file

@ -0,0 +1,3 @@
Header set ProxyTime "%D"
PassEnv HOSTNAME
Header set ProxyServer "{{ fqdn }}"

View file

@ -0,0 +1 @@
Redirect {{ status }} {{ path }} {{ target }}

View file

@ -0,0 +1 @@
RedirectMatch {{ status }} {{ regex }} {{ target }}

View file

@ -0,0 +1,2 @@
RewriteEngine On
RewriteRule {{ path }} - [R={{ status }},L]

View file

@ -0,0 +1,6 @@
RewriteEngine On
{% if path == '/favicon.ico$' %}
RewriteRule {{ path }} {{ target }} [P]
{% else %}
RewriteRule {{ path }} {{ target }} [R={{ status }},L]
{% endif %}

View file

@ -0,0 +1 @@
Alias /robots.txt /srv/web/robots.txt.{{ name }}

View file

@ -0,0 +1,50 @@
<VirtualHost {{ ips.map{|ip| ip + ":80"}.join(" ") }}>
ServerName {{ name }}
{% if not server_aliases.empty? -%}
ServerAlias {{ server_aliases.join(" ") }}
<% end -%>
ServerAdmin {{ server_admin }}
TraceEnable Off
{% if gzip -%}
SetOutputFilter DEFLATE
<% end -%>
{% if sslonly -%}
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [NE]
<% else -%>
Include "conf.d/{{ name }}/*.conf"
<% end -%>
</VirtualHost>
{% if ssl -%}
<VirtualHost {{ ips.map{|ip| ip + ":443"}.join(" ") }}>
ServerName {{ name }}
{% if not server_aliases.empty? -%}
ServerAlias {{ server_aliases.join(" ") }}
<% end -%>
ServerAdmin {{ server_admin }}
{% if gzip -%}
SetOutputFilter DEFLATE
<% end -%>
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/{{ cert_name }}.cert
SSLCertificateKeyFile /etc/pki/tls/private/{{ cert_name }}.key
{% if not sSLCertificateChainFile.empty? -%}
SSLCertificateChainFile /etc/pki/tls/certs/{{ sSLCertificateChainFile }}
<% end -%>
SSLHonorCipherOrder On
# https://fedorahosted.org/fedora-infrastructure/ticket/4101#comment:14
# If you change the protocols or cipher suites, you should probably update
# modules/squid/files/squid.conf-el6 too, to keep it in sync.
SSLProtocol -All +TLSv1 +TLSv1.1 +TLSv1.2
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK
Include "conf.d/{{ name }}/*.conf"
</VirtualHost>
<% end -%>