]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
grafana: Add option to preserve grafana config 240/head
authorBoris Ranto <branto@redhat.com>
Wed, 10 Jul 2019 08:19:53 +0000 (10:19 +0200)
committerBoris Ranto <branto@redhat.com>
Wed, 10 Jul 2019 08:25:59 +0000 (10:25 +0200)
This patch adds the grafana.overwrite_config option. You can change this
option if you want to keep your custom grafana configuration. The
scripts will still update the grafana config with the other configured
options but it won't overwrite your custom options.

Signed-off-by: Boris Ranto <branto@redhat.com>
ansible/group_vars/all.yml.sample
ansible/roles/ceph-grafana/defaults/main.yml
ansible/roles/ceph-grafana/tasks/configure_grafana.yml

index bb42c1c9f9a2646b0c704c58fc5902da80f94e6f..b74f6cc92affff39ff315297b6885b3cf7eeb08c 100644 (file)
@@ -27,3 +27,7 @@ dummy:
 #  smtp_password: password
 # If you like to enable Anonymous login, set auth_anonymous to true
 #  auth_anonymous: false
+# You can change this option if you want to keep your custom grafana configuration.
+# The script will still update the grafana config with the other configured options
+# but it won't overwrite your custom options.
+#  overwrite_config: true
index 6eb03f5b46e8a37b3691568051194a50700c5189..6eefc4967a5d68241237653abcb35aa81e243a0f 100644 (file)
@@ -23,6 +23,10 @@ defaults:
     default_theme: light
     snmp_enabled: false
     auth_anonymous: false
+    # You can change this option if you want to keep your custom grafana configuration.
+    # The script will still update the grafana config with the other configured options
+    # but it won't overwrite your custom options.
+    overwrite_config: true
     plugins:
       - vonage-status-panel
       - grafana-piechart-panel
index 05eddb6d70519472718456b12eedb951e79da1b9..6560d6670d777ea9e080b8c659f276512ab9466d 100644 (file)
@@ -16,6 +16,7 @@
     owner: root
     group: grafana
     mode: 0640
+    force: "{{ grafana.overwrite_config }}"
   tags: [ini]
 
 - name: Set owner on /etc/grafana