39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
---
|
|
- name: "gateway: {{ instance.domain }}: Domain zur Zertifikatsliste hinzufügen"
|
|
lineinfile:
|
|
path: /etc/dehydrated/domains.txt
|
|
insertafter: "^# nextcloud"
|
|
line: "{{ instance.domain }}"
|
|
register: dehydrated
|
|
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
|
|
register: dehydrated
|
|
delegate_to: "{{ gateway_host }}"
|
|
|
|
- name: "gateway: {{ instance.domain }}: Zertifikat erstellen"
|
|
command: dehydrated --cron -g
|
|
delegate_to: "{{ gateway_host }}"
|
|
when: dehydrated.changed
|
|
|
|
- name: "gateway: {{ instance.domain }}: Proxy einrichten"
|
|
template:
|
|
src: nginx_site.j2
|
|
dest: "/etc/nginx/sites-available/{{ instance.domain }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
delegate_to: "{{ gateway_host }}"
|
|
|
|
- name: "gateway: {{ instance.domain }}: Seite aktivieren"
|
|
file:
|
|
src: "/etc/nginx/sites-available/{{ instance.domain }}"
|
|
dest: "/etc/nginx/sites-enabled/{{ instance.domain }}"
|
|
state: link
|
|
notify: reload nginx
|
|
delegate_to: "{{ gateway_host }}"
|