2020-12-03 15:52:14 +01:00
|
|
|
---
|
2022-07-26 16:44:42 +02:00
|
|
|
- name: "gateway: {{ instance.name }}: Domain zur Zertifikatsliste hinzufügen"
|
2020-12-03 15:52:14 +01:00
|
|
|
lineinfile:
|
|
|
|
path: /etc/dehydrated/domains.txt
|
|
|
|
insertafter: "^# nextcloud"
|
2022-07-26 16:44:42 +02:00
|
|
|
line: "{{ instance.name }}"
|
2021-06-26 02:43:46 +02:00
|
|
|
register: dehydrated
|
2021-06-26 02:32:29 +02:00
|
|
|
delegate_to: "{{ gateway_host }}"
|
|
|
|
|
2022-07-26 16:44:42 +02:00
|
|
|
- name: "gateway: {{ instance.name }}: Alias zur Zertifikatsliste hinzufügen"
|
2021-06-26 02:32:29 +02:00
|
|
|
lineinfile:
|
|
|
|
path: /etc/dehydrated/domains.txt
|
|
|
|
insertafter: "^# nextcloud"
|
2021-10-14 16:09:47 +02:00
|
|
|
line: "{{ item }}"
|
2021-06-26 02:32:29 +02:00
|
|
|
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 }}"
|
2021-10-14 16:09:47 +02:00
|
|
|
loop: "{{ instance.alias }}"
|
2020-12-03 15:52:14 +01:00
|
|
|
|
2022-07-26 16:44:42 +02:00
|
|
|
- name: "gateway: {{ instance.name }}: 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
|
|
|
|
2022-07-26 16:44:42 +02:00
|
|
|
- name: "gateway: {{ instance.name }}: Proxy einrichten"
|
2020-12-03 15:52:14 +01:00
|
|
|
template:
|
|
|
|
src: nginx_site.j2
|
2022-07-26 16:44:42 +02:00
|
|
|
dest: "/etc/nginx/sites-available/{{ instance.name }}"
|
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
|
|
|
|
2022-07-26 16:44:42 +02:00
|
|
|
- name: "gateway: {{ instance.name }}: Seite aktivieren"
|
2020-12-03 15:52:14 +01:00
|
|
|
file:
|
2022-07-26 16:44:42 +02:00
|
|
|
src: "/etc/nginx/sites-available/{{ instance.name }}"
|
|
|
|
dest: "/etc/nginx/sites-enabled/{{ instance.name }}"
|
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 }}"
|