Roles names should be lowercase with underscores only.
ansible-lint complained:
% ansible-lint -t role-name
WARNING Listing 1 violation(s) that are fatal
role-name: Role name setup-http-site-forward does not match ``^[a-z][a-z0-9_]*$`` pattern.
roles/setup-http-site-forward:1
Read documentation for instructions on how to ignore specific rule violations.
Rule Violation Summary
count tag profile rule associated tags
1 role-name basic deprecations, metadata
Failed after min profile: 1 failure(s), 0 warning(s) on 135 files.
Fixes: 85c09ea2ae
("Add role for apache forward site")
48 lines
1.8 KiB
Django/Jinja
48 lines
1.8 KiB
Django/Jinja
{% if 'address' in ansible_default_ipv6 %}
|
|
<VirtualHost {{ ansible_default_ipv4.address }}:80 [{{ ansible_default_ipv6.address }}]:80>
|
|
{% else %}
|
|
<VirtualHost {{ ansible_default_ipv4.address }}:80>
|
|
{% endif %}
|
|
ServerAdmin {{ server_admin }}
|
|
ServerName {{ site_name }}
|
|
ServerAlias {{ site_name }}
|
|
ErrorLog /var/log/apache2/{{ site_name }}-error.log
|
|
CustomLog /var/log/apache2/{{ site_name }}-access.log common
|
|
|
|
Alias /.well-known/acme-challenge /usr/local/etc/dehydrated/challenge
|
|
|
|
<ifmodule mod_rewrite.c>
|
|
RewriteEngine On
|
|
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
|
|
RewriteRule (.*) {{forward_to}} [R=301,L]
|
|
</ifmodule>
|
|
</VirtualHost>
|
|
|
|
<IfFile /usr/local/etc/dehydrated/certs/{{ site_name }}>
|
|
{% if 'address' in ansible_default_ipv6 %}
|
|
<VirtualHost {{ ansible_default_ipv4.address }}:443 [{{ ansible_default_ipv6.address }}]:443>
|
|
{% else %}
|
|
<VirtualHost {{ ansible_default_ipv4.address }}:443>
|
|
{% endif %}
|
|
ServerAdmin {{ server_admin }}
|
|
ServerName {{ site_name }}
|
|
ServerAlias {{ site_name }}
|
|
|
|
ErrorLog /var/log/apache2/{{ site_name }}-error.log
|
|
CustomLog /var/log/apache2/{{ site_name }}-access.log common
|
|
|
|
SSLEngine on
|
|
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
|
|
SSLCertificateFile /usr/local/etc/dehydrated/certs/{{ site_name }}/cert.pem
|
|
SSLCertificateKeyFile /usr/local/etc/dehydrated/certs/{{ site_name }}/privkey.pem
|
|
SSLCertificateChainFile /usr/local/etc/dehydrated/certs/{{ site_name }}/chain.pem
|
|
|
|
Alias /.well-known/acme-challenge /usr/local/etc/dehydrated/challenge
|
|
|
|
<ifmodule mod_rewrite.c>
|
|
RewriteEngine On
|
|
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
|
|
RewriteRule (.*) {{forward_to}} [R=301,L]
|
|
</ifmodule>
|
|
</VirtualHost>
|
|
</IfFile>
|