grafana: Aktiviere notwendige Apache-Module

This commit is contained in:
phil 2022-12-28 16:39:04 +01:00
parent d672c77fd3
commit 528fc15535

View file

@ -5,13 +5,22 @@
line: "{{ grafana.domain }}" line: "{{ grafana.domain }}"
notify: get certificate notify: get certificate
- name: "webserver | Grafana-Seitenkonfigurationen kopieren" - 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"
ansible.builtin.template: ansible.builtin.template:
src: apache2-site.conf src: apache2-site.conf
dest: "/etc/apache2/sites-available/{{ grafana.domain }}.conf" dest: "/etc/apache2/sites-available/{{ grafana.domain }}.conf"
mode: 0644 mode: 0644
- name: "webserver | Grafana-Seitenkonfiguration aktivieren" - name: "webserver | Aktiviere Grafana-Seitenkonfiguration"
ansible.builtin.command: ansible.builtin.command:
cmd: "a2ensite {{ grafana.domain }}" cmd: "a2ensite {{ grafana.domain }}"
creates: "/etc/apache2/site-enabled/{{ grafana.domain }}.conf" creates: "/etc/apache2/site-enabled/{{ grafana.domain }}.conf"