diff --git a/tasks/webserver.yml b/tasks/webserver.yml index 7615191..d7de552 100644 --- a/tasks/webserver.yml +++ b/tasks/webserver.yml @@ -5,13 +5,22 @@ line: "{{ grafana.domain }}" 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: src: apache2-site.conf dest: "/etc/apache2/sites-available/{{ grafana.domain }}.conf" mode: 0644 -- name: "webserver | Grafana-Seitenkonfiguration aktivieren" +- name: "webserver | Aktiviere Grafana-Seitenkonfiguration" ansible.builtin.command: cmd: "a2ensite {{ grafana.domain }}" creates: "/etc/apache2/site-enabled/{{ grafana.domain }}.conf"