ansible-role-nextcloud/tasks/gateway.yml

37 lines
1.1 KiB
YAML
Raw Normal View History

2020-12-03 15:52:14 +01: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"
line: "{{ instance.domain }}"
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
delegate_to: "{{ gateway_host }}"
2020-12-03 15:52:14 +01:00
- name: "gateway: {{ instance.domain }}: Zertifikat erstellen"
2020-12-03 15:52:14 +01:00
command: dehydrated --cron -g
delegate_to: "{{ gateway_host }}"
2020-12-03 15:52:14 +01:00
- name: "gateway: {{ instance.domain }}: Proxy einrichten"
2020-12-03 15:52:14 +01:00
template:
src: nginx_site.j2
dest: "/etc/nginx/sites-available/{{ instance.domain }}"
2020-12-03 15:52:14 +01:00
owner: root
group: root
mode: 0644
delegate_to: "{{ gateway_host }}"
2020-12-03 15:52:14 +01:00
- name: "gateway: {{ instance.domain }}: Seite aktivieren"
2020-12-03 15:52:14 +01:00
file:
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
delegate_to: "{{ gateway_host }}"