Add matrix_prometheus_container_network/matrix_prometheus_container_additional_networks

This commit is contained in:
Slavi Pantaleev
2023-02-15 08:56:03 +02:00
parent 59a3646c66
commit 94124263a7
5 changed files with 34 additions and 3 deletions

View File

@ -45,6 +45,11 @@
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure Prometheus container network is created
community.general.docker_network:
name: "{{ matrix_prometheus_container_network }}"
driver: bridge
- name: Ensure matrix-prometheus.service installed
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-prometheus.service.j2"

View File

@ -5,3 +5,11 @@
msg: >
You need to enable `matrix_prometheus_scraper_synapse_enabled` and/or `matrix_prometheus_scraper_node_enabled` for Prometheus grab metrics.
when: "not matrix_prometheus_scraper_synapse_enabled and not matrix_prometheus_scraper_node_enabled"
- name: Fail if required Prometheus settings not defined
ansible.builtin.fail:
msg: >
You need to define a required configuration setting (`{{ item }}`).
when: "vars[item] == ''"
with_items:
- matrix_prometheus_container_network