ansible-role-nextcloud/tasks/gateway.yml

35 lines
1,013 B
YAML
Raw Normal View History

2020-12-03 15:52:14 +01:00
---
- name: "Gateway | Füge Domain zur Zertifikatsliste hinzu | {{ item.name }}"
ansible.builtin.lineinfile:
2020-12-03 15:52:14 +01:00
path: /etc/dehydrated/domains.txt
insertafter: "^# nextcloud"
line: "{{ item.name }}"
register: dehydrated
2021-06-26 02:32:29 +02:00
- name: "Gateway | Füge Alias zur Zertifikatsliste hinzu | {{ item.name }}"
ansible.builtin.lineinfile:
2021-06-26 02:32:29 +02:00
path: /etc/dehydrated/domains.txt
insertafter: "^# nextcloud"
line: "{{ alias }}"
when: item.alias is defined
loop: "{{ item.alias }}"
loop_control:
loop_var: alias
notify: Get certificate
2020-12-03 15:52:14 +01:00
- name: "Gateway | Richte Proxy ein | {{ item.name }}"
ansible.builtin.template:
2020-12-03 15:52:14 +01:00
src: nginx_site.j2
dest: "/etc/nginx/sites-available/{{ item.name }}"
2020-12-03 15:52:14 +01:00
owner: root
group: root
mode: "0644"
2023-10-25 18:35:43 +02:00
notify: Reload nginx
2020-12-03 15:52:14 +01:00
- name: "Gateway | Aktiviere Seite | {{ item.name }}"
ansible.builtin.file:
src: "/etc/nginx/sites-available/{{ item.name }}"
dest: "/etc/nginx/sites-enabled/{{ item.name }}"
2020-12-03 15:52:14 +01:00
state: link
2023-10-25 18:35:43 +02:00
notify: Reload nginx