Merge pull request '🐛 Fix template in setup-http-dehydrated when IPv6 is missing' (!79) from dehydrated-site-v6 into master

Reviewed-on: https://gitea.n39.eu/Netz39_Admin/netz39-infra-ansible/pulls/79
Reviewed-by: dkdent <dkdent@netz39.de>
This commit is contained in:
Stefan Haun 2022-09-06 23:35:33 +00:00
commit a805886cda

View file

@ -1,4 +1,8 @@
<VirtualHost {{ ansible_default_ipv4.address }}:80 [{{ ansible_default_ipv6.address | default('::1') }}]:80> {% 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 }} ServerAdmin {{ server_admin }}
ServerName {{ site_name }} ServerName {{ site_name }}
ServerAlias {{ site_name }} ServerAlias {{ site_name }}
@ -9,7 +13,11 @@
</VirtualHost> </VirtualHost>
<IfFile {{dehydrated_certs_dir}}/{{ site_name }}> <IfFile {{dehydrated_certs_dir}}/{{ site_name }}>
<VirtualHost {{ ansible_default_ipv4.address }}:443 [{{ ansible_default_ipv6.address | default('::1') }}]:80> {% 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 }} ServerAdmin {{ server_admin }}
ServerName {{ site_name }} ServerName {{ site_name }}
ServerAlias {{ site_name }} ServerAlias {{ site_name }}