ansible-role-grafana/tasks/webserver.yml

22 lines
609 B
YAML
Raw Normal View History

2022-12-27 10:43:32 +01:00
---
2023-11-20 11:47:05 +01:00
- name: "Webserver | Aktiviere Apache-Modul"
community.general.apache2_module:
name: "{{ item }}"
state: present
notify: restart apache2
loop:
- proxy
- proxy_http
2023-11-20 11:47:05 +01:00
- name: "Webserver | Kopiere Grafana-Seitenkonfiguration"
2022-12-27 10:43:32 +01:00
ansible.builtin.template:
src: apache2-site.conf
2023-11-20 11:47:05 +01:00
dest: "/etc/apache2/sites-available/{{ grafana_domain }}.conf"
mode: "0644"
2022-12-27 10:43:32 +01:00
2023-11-20 11:47:05 +01:00
- name: "Webserver | Aktiviere Grafana-Seitenkonfiguration"
2022-12-27 10:49:52 +01:00
ansible.builtin.command:
2023-11-20 11:47:05 +01:00
cmd: "a2ensite {{ grafana_domain }}"
creates: "/etc/apache2/site-enabled/{{ grafana_domain }}.conf"
2022-12-27 10:43:32 +01:00
notify: reload apache2