Avoid to setup provisioners in a fully containerized environment

This commit adds a when clause to avoid the setup of grafana
provisioners in a fully containerized scenario.
This is needed when the ceph-grafana-dashboards package is not
installed and this task could result in a wrong grafana
configuration that let the container crash.

Signed-off-by: fmount <fpantano@redhat.com>
(cherry picked from commit fac1b030cb)
pull/4267/head
fmount 2019-07-12 11:03:57 +02:00 committed by Guillaume Abrioux
parent 12839a3f66
commit 15c745d998
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@
with_items: with_items:
- "/etc/grafana/provisioning/datasources" - "/etc/grafana/provisioning/datasources"
- "/etc/grafana/provisioning/dashboards" - "/etc/grafana/provisioning/dashboards"
- "/etc/grafana/provisioning/notifiers"
- name: write grafana.ini - name: write grafana.ini
template: template:
@ -46,6 +47,7 @@
src: dashboards-ceph-dashboard.yml.j2 src: dashboards-ceph-dashboard.yml.j2
dest: /etc/grafana/provisioning/dashboards/ceph-dashboard.yml dest: /etc/grafana/provisioning/dashboards/ceph-dashboard.yml
mode: 0640 mode: 0640
when: not containerized_deployment | bool
- name: copy grafana SSL certificate file - name: copy grafana SSL certificate file
copy: copy: