notify: Restart Grafana
- include: grafana_plugins.yml
+ when: devel_mode
- name: Ship dashboard templates
copy:
src: files/dashboards
dest: /tmp/
+ when: devel_mode
- name: Ship dashUpdater.py
copy:
src: files/dashUpdater.py
dest: /tmp/dashUpdater.py
+ when: devel_mode
- name: Write dashboard.yml
template:
dest: /tmp/dashboard.yml
- name: Push dashboards to Grafana
- command: python dashUpdater.py -D ./dashboards
- args:
- chdir: /tmp
+ command: python /tmp/dashUpdater.py -c /tmp/dashboard.yml -D /tmp/dashboards
+ when: devel_mode
+
+- name: Push dashboards to Grafana
+ command: /usr/libexec/cephmetrics/dashUpdater.py -c /tmp/dashboard.yml -D /usr/share/cephmetrics/dashboards
+ when: not devel_mode
state: "{{ 'present' if use_epel else 'absent' }}"
when:
- ansible_pkg_mgr == "yum"
+ - devel_mode
- name: Install chacra repo
copy:
when:
- ansible_pkg_mgr == 'yum'
- use_epel
+ - devel_mode
- name: Remove Grafana repo
file: