diff --git a/ansible/roles/alertmanager/defaults/main.yml b/ansible/roles/alertmanager/defaults/main.yml index f23d8b6..3841347 100644 --- a/ansible/roles/alertmanager/defaults/main.yml +++ b/ansible/roles/alertmanager/defaults/main.yml @@ -1,6 +1,7 @@ --- alertmanager_version: "0.27.0" alertmanager_port: 9093 +alertmanager_container_name: "alertmanager" alertmanager_docker_namespace: "{{ docker_namespace if docker_namespace else 'prom' }}" alertmanager_config_dir: "{{ ansitheus_config_dir }}/alertmanager" alertmanager_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ alertmanager_docker_namespace }}/alertmanager:v{{ alertmanager_version }}" @@ -124,7 +125,7 @@ alertmanager_route: # ---------------------- alertmanager_services: alertmanager: - container_name: alertmanager + container_name: "{{ alertmanager_container_name }}" group: alertmanager enabled: "{{ enable_alertmanager }}" image: "{{ alertmanager_image }}" diff --git a/ansible/roles/cadvisor/defaults/main.yml b/ansible/roles/cadvisor/defaults/main.yml index ace5ae5..07f8208 100644 --- a/ansible/roles/cadvisor/defaults/main.yml +++ b/ansible/roles/cadvisor/defaults/main.yml @@ -1,6 +1,7 @@ --- cadvisor_version: "0.49.1" cadvisor_port: "8080" +cadvisor_container_name: "cadvisor" cadvisor_docker_namespace: "{{ docker_namespace if docker_namespace else 'cadvisor' }}" cadvisor_image: "{{ docker_registry ~ '/' if docker_registry else 'gcr.io/' }}{{ cadvisor_docker_namespace }}/cadvisor:v{{ cadvisor_version }}" cadvisor_docker_log_driver: "{{ docker_log_driver }}" @@ -23,7 +24,7 @@ cadvisor_housekeeping_interval: 30s # --------------------- cadvisor_services: cadvisor: - container_name: "cadvisor" + container_name: "{{ cadvisor_container_name }}" group: "cadvisor" enabled: "{{ enable_cadvisor }}" image: "{{ cadvisor_image }}" diff --git a/ansible/roles/grafana/defaults/main.yml b/ansible/roles/grafana/defaults/main.yml index 56d2ede..6025601 100644 --- a/ansible/roles/grafana/defaults/main.yml +++ b/ansible/roles/grafana/defaults/main.yml @@ -1,5 +1,6 @@ --- grafana_version: "10.4.2" +grafana_container_name: "grafana" grafana_docker_namespace: "{{ docker_namespace if docker_namespace else 'grafana' }}" grafana_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ grafana_docker_namespace }}/grafana:{{ grafana_version }}" grafana_data_volume: "grafana" @@ -110,7 +111,7 @@ grafana_log: # ---------------------- grafana_services: grafana: - container_name: "grafana" + container_name: "{{ grafana_container_name }}" group: "grafana" enabled: "{{ enable_grafana | bool }}" port: "{{ grafana_port }}" diff --git a/ansible/roles/haproxy/defaults/main.yml b/ansible/roles/haproxy/defaults/main.yml index c898434..2ca772b 100644 --- a/ansible/roles/haproxy/defaults/main.yml +++ b/ansible/roles/haproxy/defaults/main.yml @@ -1,5 +1,6 @@ --- haproxy_version: "lts-alpine" +haproxy_container_name: "haproxy" haproxy_docker_namespace: "{{ docker_namespace if docker_namespace else '' }}" haproxy_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ haproxy_docker_namespace ~ '/' if haproxy_docker_namespace else '' }}haproxy:{{ haproxy_version }}" haproxy_docker_log_driver: "{{ docker_log_driver }}" @@ -31,7 +32,7 @@ prometheus_active_passive_mode: "no" # --------------------- haproxy_services: haproxy: - container_name: "haproxy" + container_name: "{{ haproxy_container_name }}" group: "haproxy" enabled: "{{ enable_haproxy }}" image: "{{ haproxy_image }}" diff --git a/ansible/roles/mysqld_exporter/defaults/main.yml b/ansible/roles/mysqld_exporter/defaults/main.yml index 793fc69..a9feb40 100644 --- a/ansible/roles/mysqld_exporter/defaults/main.yml +++ b/ansible/roles/mysqld_exporter/defaults/main.yml @@ -1,6 +1,7 @@ --- mysqld_exporter_version: "0.15.1" mysqld_exporter_port: 9104 +mysqld_exporter_container_name: "mysqld_exporter" mysqld_exporter_docker_namespace: "{{ docker_namespace if docker_namespace else 'prom' }}" mysqld_exporter_docker_log_driver: "{{ docker_log_driver }}" mysqld_exporter_docker_log_opts: "{{ docker_log_opts }}" @@ -33,7 +34,7 @@ mysqld_exporter_disabled_collectors: [] mysqld_exporter_services: mysqld_exporter: - container_name: "mysqld_exporter" + container_name: "{{ mysqld_exporter_container_name }}" group: "mysqld_exporter" enabled: "{{ enable_mysqld_exporter }}" image: "{{ mysqld_exporter_image }}" diff --git a/ansible/roles/node_exporter/defaults/main.yml b/ansible/roles/node_exporter/defaults/main.yml index 7bc63a2..924a770 100644 --- a/ansible/roles/node_exporter/defaults/main.yml +++ b/ansible/roles/node_exporter/defaults/main.yml @@ -1,6 +1,7 @@ --- node_exporter_version: "1.8.0" node_exporter_port: 9100 +node_exporter_container_name: "node_exporter" node_exporter_docker_namespace: "{{ docker_namespace if docker_namespace else 'prom' }}" node_exporter_docker_log_driver: "{{ docker_log_driver }}" node_exporter_docker_log_opts: "{{ docker_log_opts }}" @@ -31,7 +32,7 @@ node_exporter_disabled_collectors: [] node_exporter_services: node_exporter: - container_name: "node_exporter" + container_name: "{{ node_exporter_container_name }}" group: "node_exporter" enabled: "{{ enable_node_exporter }}" image: "{{ node_exporter_image }}" diff --git a/ansible/roles/prometheus/defaults/main.yml b/ansible/roles/prometheus/defaults/main.yml index d4a8e6f..2716531 100644 --- a/ansible/roles/prometheus/defaults/main.yml +++ b/ansible/roles/prometheus/defaults/main.yml @@ -2,6 +2,7 @@ prometheus_version: "2.52.0" prometheus_docker_namespace: "{{ docker_namespace if docker_namespace else 'prom' }}" prometheus_port: 9090 +prometheus_container_name: "prometheus" prometheus_config_dir: "{{ ansitheus_config_dir }}/prometheus" prometheus_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ prometheus_docker_namespace }}/prometheus:v{{ prometheus_version }}" prometheus_volume: "prometheus_data" @@ -64,7 +65,7 @@ prometheus_external_labels: # --------------------- prometheus_services: prometheus: - container_name: prometheus + container_name: "{{ prometheus_container_name }}" group: prometheus enabled: "{{ enable_prometheus }}" image: "{{ prometheus_image }}"