]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
ceph-grafana: Split out plugin installation
authorZack Cerza <zack@redhat.com>
Thu, 22 Jun 2017 20:06:07 +0000 (14:06 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 22 Jun 2017 20:08:47 +0000 (14:08 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
ansible/roles/ceph-grafana/tasks/configure_grafana.yml
ansible/roles/ceph-grafana/tasks/grafana_plugins.yml [new file with mode: 0644]

index 20b1a11e7498c567ae8529ed0dc77e2b589fca01..a0110dbc3cc4e2cca80628220cb75335b6143858 100644 (file)
   tags: [ini]
   notify: Restart Grafana
 
-- name: Download Vonage Status Panel
-  get_url:
-    url: https://grafana.com/api/plugins/vonage-status-panel/versions/1.0.4/download
-    dest: /tmp/vonage.zip
-
-- name: Create Grafana plugins directory
-  file:
-    name: /var/lib/grafana/plugins
-    state: directory
-
-- set_fact:
-    vonage_plugin_path: /var/lib/grafana/plugins/Vonage-Grafana_Status_panel
-
-- stat:
-    path: "{{ vonage_plugin_path }}"
-  register: vonage_plugin
-
-- name: Unzip Vonage Status Panel
-  unarchive:
-    src: /tmp/vonage.zip
-    remote_src: true
-    dest: /var/lib/grafana/plugins/
-  when: vonage_plugin.stat.exists is defined and not vonage_plugin.stat.exists
-
-- name: Move Vonage Status Panel into place
-  shell: "mv -f {{ vonage_plugin_path }}* {{ vonage_plugin_path }}"
-  when: vonage_plugin.stat.exists is defined and not vonage_plugin.stat.exists
-  notify: Restart Grafana
+- include: grafana_plugins.yml
 
 - name: Ship dashboard templates
   copy:
diff --git a/ansible/roles/ceph-grafana/tasks/grafana_plugins.yml b/ansible/roles/ceph-grafana/tasks/grafana_plugins.yml
new file mode 100644 (file)
index 0000000..74b845e
--- /dev/null
@@ -0,0 +1,29 @@
+---
+- name: Download Vonage Status Panel
+  get_url:
+    url: https://grafana.com/api/plugins/vonage-status-panel/versions/1.0.4/download
+    dest: /tmp/vonage.zip
+
+- name: Create Grafana plugins directory
+  file:
+    name: /var/lib/grafana/plugins
+    state: directory
+
+- set_fact:
+    vonage_plugin_path: /var/lib/grafana/plugins/Vonage-Grafana_Status_panel
+
+- stat:
+    path: "{{ vonage_plugin_path }}"
+  register: vonage_plugin
+
+- name: Unzip Vonage Status Panel
+  unarchive:
+    src: /tmp/vonage.zip
+    remote_src: true
+    dest: /var/lib/grafana/plugins/
+  when: vonage_plugin.stat.exists is defined and not vonage_plugin.stat.exists
+
+- name: Move Vonage Status Panel into place
+  shell: "mv -f {{ vonage_plugin_path }}* {{ vonage_plugin_path }}"
+  when: vonage_plugin.stat.exists is defined and not vonage_plugin.stat.exists
+  notify: Restart Grafana