2020-12-03 15:52:14 +01:00
|
|
|
---
|
2021-06-26 01:45:06 +02:00
|
|
|
- name: "gateway: {{ instance.domain }}: Domain zur Zertifikatsliste hinzufügen"
|
2020-12-03 15:52:14 +01:00
|
|
|
lineinfile:
|
|
|
|
path: /etc/dehydrated/domains.txt
|
|
|
|
insertafter: "^# nextcloud"
|
2021-06-26 01:45:06 +02:00
|
|
|
line: "{{ instance.domain }}"
|
2021-06-26 02:43:46 +02:00
|
|
|
register: dehydrated
|
2021-06-26 02:32:29 +02:00
|
|
|
delegate_to: "{{ gateway_host }}"
|
|
|
|
|
|
|
|
- name: "gateway: {{ instance.domain }}: Alias zur Zertifikatsliste hinzufügen"
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/dehydrated/domains.txt
|
|
|
|
insertafter: "^# nextcloud"
|
|
|
|
line: "{{ instance.alias }}"
|
|
|
|
when: instance.alias is defined
|
2021-06-26 02:43:46 +02:00
|
|
|
register: dehydrated
|
2021-06-26 01:14:24 +02:00
|
|
|
delegate_to: "{{ gateway_host }}"
|
2020-12-03 15:52:14 +01:00
|
|
|
|
2021-06-26 01:45:06 +02:00
|
|
|
- name: "gateway: {{ instance.domain }}: Zertifikat erstellen"
|
2020-12-03 15:52:14 +01:00
|
|
|
command: dehydrated --cron -g
|
2021-06-26 01:14:24 +02:00
|
|
|
delegate_to: "{{ gateway_host }}"
|
2021-06-26 02:43:46 +02:00
|
|
|
when: dehydrated.changed
|
2020-12-03 15:52:14 +01:00
|
|
|
|
2021-06-26 01:45:06 +02:00
|
|
|
- name: "gateway: {{ instance.domain }}: Proxy einrichten"
|
2020-12-03 15:52:14 +01:00
|
|
|
template:
|
|
|
|
src: nginx_site.j2
|
2021-06-26 01:45:06 +02:00
|
|
|
dest: "/etc/nginx/sites-available/{{ instance.domain }}"
|
2020-12-03 15:52:14 +01:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
2021-06-26 01:14:24 +02:00
|
|
|
delegate_to: "{{ gateway_host }}"
|
2020-12-03 15:52:14 +01:00
|
|
|
|
2021-06-26 01:45:06 +02:00
|
|
|
- name: "gateway: {{ instance.domain }}: Seite aktivieren"
|
2020-12-03 15:52:14 +01:00
|
|
|
file:
|
2021-06-26 01:45:06 +02:00
|
|
|
src: "/etc/nginx/sites-available/{{ instance.domain }}"
|
|
|
|
dest: "/etc/nginx/sites-enabled/{{ instance.domain }}"
|
2020-12-03 15:52:14 +01:00
|
|
|
state: link
|
|
|
|
notify: reload nginx
|
2021-06-26 01:14:24 +02:00
|
|
|
delegate_to: "{{ gateway_host }}"
|