ansible-role-nextcloud/tasks/gateway.yml

30 lines
907 B
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 }}"
2020-12-03 15:52:14 +01:00
# when: dehydrated_installiert
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 }}"