ansible-role-nextcloud/tasks/gateway.yml

29 lines
775 B
YAML

---
- name: "Gateway Domain zur Zertifikatsliste hinzufügen"
lineinfile:
path: /etc/dehydrated/domains.txt
insertafter: "^# nextcloud"
line: "{{ domain }}"
# when: dehydrated_installiert
delegate_to: "{{ gateway_host }}"
- name: "Gateway Zertifikat erstellen"
command: dehydrated --cron -g
delegate_to: "{{ gateway_host }}"
- name: "Gateway Proxy einrichten"
template:
src: nginx_site.j2
dest: "/etc/nginx/sites-available/{{ domain }}"
owner: root
group: root
mode: 0644
delegate_to: "{{ gateway_host }}"
- name: "Gateway Seite aktivieren"
file:
src: "/etc/nginx/sites-available/{{ domain }}"
dest: "/etc/nginx/sites-enabled/{{ domain }}"
state: link
notify: reload nginx
delegate_to: "{{ gateway_host }}"