From 29b0d47c8cc3943ee89aaa660455616f87f90caa Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 21 May 2019 10:29:16 -0400 Subject: [PATCH] ceph-prometheus: fix error in templates - remove trailing double quotes in jinja templates - add jinja filename without .j2 suffix Resolves: #4011 Signed-off-by: Dimitri Savineau --- roles/ceph-prometheus/tasks/main.yml | 4 ++-- roles/ceph-prometheus/templates/alertmanager.service.j2 | 2 +- roles/ceph-prometheus/templates/prometheus.service.j2 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/ceph-prometheus/tasks/main.yml b/roles/ceph-prometheus/tasks/main.yml index 71affd66b..55ce5e2e2 100644 --- a/roles/ceph-prometheus/tasks/main.yml +++ b/roles/ceph-prometheus/tasks/main.yml @@ -11,7 +11,7 @@ - name: write prometheus config file template: src: prometheus.yml.j2 - dest: "{{ prometheus_conf_dir }}/" + dest: "{{ prometheus_conf_dir }}/prometheus.yml" owner: "{{ prometheus_user_id }}" notify: service handler @@ -41,7 +41,7 @@ - name: write alertmanager config file template: src: alertmanager.yml.j2 - dest: "{{ alertmanager_conf_dir }}/" + dest: "{{ alertmanager_conf_dir }}/alertmanager.yml" owner: "root" notify: service handler diff --git a/roles/ceph-prometheus/templates/alertmanager.service.j2 b/roles/ceph-prometheus/templates/alertmanager.service.j2 index 6a9c9c524..207a53e6e 100644 --- a/roles/ceph-prometheus/templates/alertmanager.service.j2 +++ b/roles/ceph-prometheus/templates/alertmanager.service.j2 @@ -19,7 +19,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --name=alertmanager \ --memory-swap={{ alertmanager_container_memory * 2 }}GB \ {{ alertmanager_container_image }} \ --config.file=/etc/alertmanager/alertmanager.yml \ - --storage.path=/alertmanager" + --storage.path=/alertmanager ExecStop=/usr/bin/{{ container_binary }} stop alertmanager Restart=always RestartSec=10s diff --git a/roles/ceph-prometheus/templates/prometheus.service.j2 b/roles/ceph-prometheus/templates/prometheus.service.j2 index 1d99c7e05..0ae01940b 100644 --- a/roles/ceph-prometheus/templates/prometheus.service.j2 +++ b/roles/ceph-prometheus/templates/prometheus.service.j2 @@ -21,7 +21,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --name=prometheus \ {{ prometheus_container_image }} \ --config.file=/etc/prometheus/prometheus.yml \ --storage.tsdb.path=/prometheus \ - --web.external-url=http://{{ inventory_hostname }}:9090/" + --web.external-url=http://{{ inventory_hostname }}:9090/ ExecStop=/usr/bin/{{ container_binary }} stop prometheus Restart=always RestartSec=10s