From: Zack Cerza Date: Fri, 13 Apr 2018 22:43:17 +0000 (-0600) Subject: ceph-grafana: Use ansible's to_json filter X-Git-Tag: v2.0~37^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ea20fce534959de1bf00b8120e50eb2162027f6f;p=cephmetrics.git ceph-grafana: Use ansible's to_json filter 'tojson' is part of jinja2 2.9, which isn't in RHEL. Signed-off-by: Zack Cerza --- diff --git a/ansible/roles/ceph-grafana/tasks/push_dashboards.yml b/ansible/roles/ceph-grafana/tasks/push_dashboards.yml index 545032c..8a691bd 100644 --- a/ansible/roles/ceph-grafana/tasks/push_dashboards.yml +++ b/ansible/roles/ceph-grafana/tasks/push_dashboards.yml @@ -63,5 +63,5 @@ force_basic_auth: yes status_code: 200 body_format: json - body: '{"dashboard": {{ dashboards[item].body|tojson }}, "overwrite": true}' + body: '{"dashboard": {{ dashboards[item].body|to_json }}, "overwrite": true}' with_items: "{{ dashboards.keys() }}"