2020-12-03 15:52:14 +01:00
|
|
|
---
|
2023-05-21 23:01:31 +02: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"
|
2023-05-21 23:01:31 +02:00
|
|
|
line: "{{ item.name }}"
|
2021-06-26 02:43:46 +02:00
|
|
|
register: dehydrated
|
2021-06-26 02:32:29 +02:00
|
|
|
|
2023-05-21 23:01:31 +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"
|
2023-05-21 23:01:31 +02:00
|
|
|
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
|
|
|
|
2023-05-21 23:01:31 +02:00
|
|
|
- name: "Gateway | Richte Proxy ein | {{ item.name }}"
|
|
|
|
ansible.builtin.template:
|
2020-12-03 15:52:14 +01:00
|
|
|
src: nginx_site.j2
|
2023-05-21 23:01:31 +02:00
|
|
|
dest: "/etc/nginx/sites-available/{{ item.name }}"
|
2020-12-03 15:52:14 +01:00
|
|
|
owner: root
|
|
|
|
group: root
|
2023-05-21 23:01:31 +02:00
|
|
|
mode: "0644"
|
2023-10-25 18:35:43 +02:00
|
|
|
notify: Reload nginx
|
2020-12-03 15:52:14 +01:00
|
|
|
|
2023-05-21 23:01:31 +02: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
|