mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-06-26 11:17:51 +02:00
More ansible-lint fixes
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-prometheus-node-exporter.service'] }}"
|
||||
when: matrix_prometheus_node_exporter_enabled|bool
|
||||
when: matrix_prometheus_node_exporter_enabled | bool
|
||||
|
||||
- block:
|
||||
- name: Fail if matrix-nginx-proxy role already executed
|
||||
@ -12,13 +12,13 @@
|
||||
but it's pointless since the matrix-nginx-proxy role had already executed.
|
||||
To fix this, please change the order of roles in your playbook,
|
||||
so that the matrix-nginx-proxy role would run after the matrix-prometheus-node-exporter role.
|
||||
when: matrix_nginx_proxy_role_executed|default(False)|bool
|
||||
when: matrix_nginx_proxy_role_executed | default(False) | bool
|
||||
|
||||
- name: Generate node-exporter metrics proxying configuration for matrix-nginx-proxy (matrix.DOMAIN/metrics/node-exporter)
|
||||
ansible.builtin.set_fact:
|
||||
matrix_prometheus_node_exporter_nginx_metrics_configuration_block: |
|
||||
location /metrics/node-exporter {
|
||||
{% if matrix_nginx_proxy_enabled|default(False) %}
|
||||
{% if matrix_nginx_proxy_enabled | default(False) %}
|
||||
{# Use the embedded DNS resolver in Docker containers to discover the service #}
|
||||
resolver 127.0.0.11 valid=5s;
|
||||
set $backend "matrix-prometheus-node-exporter:9100";
|
||||
@ -34,8 +34,8 @@
|
||||
ansible.builtin.set_fact:
|
||||
matrix_nginx_proxy_proxy_matrix_metrics_additional_system_location_configuration_blocks: |
|
||||
{{
|
||||
matrix_nginx_proxy_proxy_matrix_metrics_additional_system_location_configuration_blocks|default([])
|
||||
matrix_nginx_proxy_proxy_matrix_metrics_additional_system_location_configuration_blocks | default([])
|
||||
+
|
||||
[matrix_prometheus_node_exporter_nginx_metrics_configuration_block]
|
||||
}}
|
||||
when: matrix_prometheus_node_exporter_enabled|bool and matrix_prometheus_node_exporter_metrics_proxying_enabled|bool
|
||||
when: matrix_prometheus_node_exporter_enabled | bool and matrix_prometheus_node_exporter_metrics_proxying_enabled | bool
|
||||
|
Reference in New Issue
Block a user