Fake site + force IPv6

pull/35/head
Emilien Mantel 2018-03-22 20:30:10 +01:00
parent 19a85ca381
commit 3fb8f092fb
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@
- name: SET_FACT | Assign var with certificates to create - name: SET_FACT | Assign var with certificates to create
set_fact: set_fact:
acme_create: "{{ acme_create | default([]) + [ (item.item | combine({'listen': ([item.item.acme_port|default(80)]) }) ) ] }}" acme_create: "{{ acme_create | default([]) }}"
with_items: "{{ acme_installed_certs.results }}" with_items: "{{ acme_installed_certs.results }}"
when: item.skipped is not defined and not item.stat.exists when: item.skipped is not defined and not item.stat.exists

View File

@ -1,7 +1,7 @@
server { server {
{% for port in item.listen | default(['80', '[::]:80']) %} listen {{ item.acme_port | default('80') }};
listen {{ port }}; listen [::]:{{ item.acme_port | default('80') }};
{% endfor %}
server_name {% if item.name is string %}{{ item.name }}{% else %}{{ item.name | join(" ") }}{% endif %}{% if item.redirect_from is defined %} {% if item.redirect_from is string %}{{ item.redirect_from }}{% else %}{{ item.redirect_from | join(" ") }}{% endif %}{% endif %}; server_name {% if item.name is string %}{{ item.name }}{% else %}{{ item.name | join(" ") }}{% endif %}{% if item.redirect_from is defined %} {% if item.redirect_from is string %}{{ item.redirect_from }}{% else %}{{ item.redirect_from | join(" ") }}{% endif %}{% endif %};
location / { location / {