2022-12-27 10:43:32 +01:00
|
|
|
---
|
|
|
|
- name: "webserver | Erzeuge Letsencrypt-Zertifikat"
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: /etc/dehydrated/domains.txt
|
|
|
|
line: "{{ grafana.domain }}"
|
|
|
|
notify: get certificate
|
|
|
|
|
2022-12-28 16:39:04 +01:00
|
|
|
- name: "webserver | Aktiviere Apache-Modul"
|
|
|
|
ansible.builtin.apache2_module:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
notify: restart apache2
|
|
|
|
loop:
|
|
|
|
- proxy
|
|
|
|
- proxy_http
|
|
|
|
|
|
|
|
- name: "webserver | Kopiere Grafana-Seitenkonfiguration"
|
2022-12-27 10:43:32 +01:00
|
|
|
ansible.builtin.template:
|
|
|
|
src: apache2-site.conf
|
|
|
|
dest: "/etc/apache2/sites-available/{{ grafana.domain }}.conf"
|
|
|
|
mode: 0644
|
|
|
|
|
2022-12-28 16:39:04 +01:00
|
|
|
- name: "webserver | Aktiviere Grafana-Seitenkonfiguration"
|
2022-12-27 10:49:52 +01:00
|
|
|
ansible.builtin.command:
|
|
|
|
cmd: "a2ensite {{ grafana.domain }}"
|
2022-12-27 10:55:01 +01:00
|
|
|
creates: "/etc/apache2/site-enabled/{{ grafana.domain }}.conf"
|
2022-12-27 10:43:32 +01:00
|
|
|
notify: reload apache2
|