34 lines
1,013 B
YAML
34 lines
1,013 B
YAML
---
|
|
- name: "Gateway | Füge Domain zur Zertifikatsliste hinzu | {{ item.name }}"
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/dehydrated/domains.txt
|
|
insertafter: "^# nextcloud"
|
|
line: "{{ item.name }}"
|
|
register: dehydrated
|
|
|
|
- name: "Gateway | Füge Alias zur Zertifikatsliste hinzu | {{ item.name }}"
|
|
ansible.builtin.lineinfile:
|
|
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
|
|
|
|
- name: "Gateway | Richte Proxy ein | {{ item.name }}"
|
|
ansible.builtin.template:
|
|
src: nginx_site.j2
|
|
dest: "/etc/nginx/sites-available/{{ item.name }}"
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
notify: Reload nginx
|
|
|
|
- name: "Gateway | Aktiviere Seite | {{ item.name }}"
|
|
ansible.builtin.file:
|
|
src: "/etc/nginx/sites-available/{{ item.name }}"
|
|
dest: "/etc/nginx/sites-enabled/{{ item.name }}"
|
|
state: link
|
|
notify: Reload nginx
|