diff --git a/defaults/main.yml b/defaults/main.yml index ae37060..244e2cf 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,6 +3,9 @@ awh_services_docker_pull: "no" prometheus_exporter_packages: [] +prometheus_nodes_ip: + localhost: "127.0.0.1" + prometheus_mongodb_exporter_database: "database" prometheus_mongodb_exporter_host: "localhost" prometheus_mongodb_exporter_port: 27017 diff --git a/tasks/prometheus.yml b/tasks/prometheus.yml index eeda129..ce8e69b 100644 --- a/tasks/prometheus.yml +++ b/tasks/prometheus.yml @@ -62,6 +62,7 @@ tag: docker_prometheus restart_policy: 'unless-stopped' pull: '{{ awh_services_docker_pull }}' + etc_hosts: '{{ prometheus_nodes_ip }}' tags: - prometheus notify: