WIP: Depend webserver tasks on specific webserver
This commit is contained in:
parent
c892e8fba8
commit
e0d2378808
2 changed files with 22 additions and 18 deletions
|
@ -1,21 +1,24 @@
|
|||
---
|
||||
- name: "Webserver | Aktiviere Apache-Modul"
|
||||
community.general.apache2_module:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
notify: restart apache2
|
||||
loop:
|
||||
- proxy
|
||||
- proxy_http
|
||||
- name: "Webserver | Configure Apache2"
|
||||
when: grafana_webserver == "apache"
|
||||
block:
|
||||
- name: "Webserver | Aktiviere Apache-Modul"
|
||||
community.general.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 | Kopiere Grafana-Seitenkonfiguration"
|
||||
ansible.builtin.template:
|
||||
src: apache2-site.conf
|
||||
dest: "/etc/apache2/sites-available/{{ grafana_domain }}.conf"
|
||||
mode: "0644"
|
||||
|
||||
- name: "Webserver | Aktiviere Grafana-Seitenkonfiguration"
|
||||
ansible.builtin.command:
|
||||
cmd: "a2ensite {{ grafana_domain }}"
|
||||
creates: "/etc/apache2/site-enabled/{{ grafana_domain }}.conf"
|
||||
notify: reload apache2
|
||||
- name: "Webserver | Aktiviere Grafana-Seitenkonfiguration"
|
||||
ansible.builtin.command:
|
||||
cmd: "a2ensite {{ grafana_domain }}"
|
||||
creates: "/etc/apache2/site-enabled/{{ grafana_domain }}.conf"
|
||||
notify: reload apache2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue