Break dependency between matrix-prometheus and (matrix-prometheus-node-exporter, matrix-synapse)

This commit is contained in:
Slavi Pantaleev
2021-01-31 19:23:12 +02:00
parent 6842102e00
commit c8ab200cb1
5 changed files with 30 additions and 16 deletions

View File

@ -34,6 +34,17 @@
matrix_prometheus_scraper_node_targets: ["{{ matrix_docker_network_info.network.IPAM.Config[0].Gateway }}:9100"]
when: "matrix_prometheus_scraper_node_enabled|bool and matrix_prometheus_scraper_node_targets|length == 0"
- name: Download synapse-v2.rules
get_url:
url: "{{ matrix_prometheus_scraper_synapse_rules_download_url }}"
dest: "{{ matrix_prometheus_config_path }}/synapse-v2.rules"
force: true
mode: 0440
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
when: "matrix_prometheus_scraper_synapse_rules_enabled|bool"
- name: Ensure prometheus.yml installed
copy:
content: "{{ matrix_prometheus_configuration|to_nice_yaml }}"
@ -42,15 +53,6 @@
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Download synapse-v2.rules
get_url:
url: "{{ matrix_synapse_prometheus_rules_download_url }}"
dest: "{{ matrix_prometheus_config_path }}/synapse-v2.rules"
force: true
mode: 0440
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure matrix-prometheus.service installed
template:
src: "{{ role_path }}/templates/systemd/matrix-prometheus.service.j2"