]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
playbook: use blocks for grafana-server section
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 15 May 2019 12:11:00 +0000 (14:11 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 16 May 2019 14:39:13 +0000 (16:39 +0200)
use a block in grafana-server section to avoid duplicate condition.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
site-container.yml.sample
site.yml.sample

index a76394f5f2ea4401c1800b51a196df144866fc2d..044e144f937701e0284bad64c5eee1732f6e0251 100644 (file)
 - hosts: grafana-server
   become: true
   tasks:
-    - import_role:
-        name: ceph-defaults
-      tags: ['ceph_update_config']
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-facts
-      tags: ['ceph_update_config']
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-handler
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-node-exporter
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-common
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-config
-      tags: ['ceph_update_config']
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-prometheus
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-grafana
+    - block:
+      - import_role:
+          name: ceph-defaults
+        tags: ['ceph_update_config']
+      - import_role:
+          name: ceph-facts
+        tags: ['ceph_update_config']
+      - import_role:
+          name: ceph-handler
+      - import_role:
+          name: ceph-node-exporter
+      - import_role:
+          name: ceph-common
+      - import_role:
+          name: ceph-config
+        tags: ['ceph_update_config']
+      - import_role:
+          name: ceph-prometheus
+      - import_role:
+          name: ceph-grafana
       when: dashboard_enabled
 
 - hosts: '{{ (groups["mgrs"] | default(groups["mons"]))[0] }}'
   become: true
   tasks:
-    - import_role:
-        name: ceph-defaults
-      tags: ['ceph_update_config']
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-dashboard
+    - block:
+        - import_role:
+            name: ceph-defaults
+          tags: ['ceph_update_config']
+        - import_role:
+            name: ceph-dashboard
       when: dashboard_enabled
index dc717b1f4905e944e8c6d2681ca01c980d0abd64..6d8fe23cdd2e94dce3b2d9b3378e40f20aa81ee1 100644 (file)
 - hosts: grafana-server
   become: true
   tasks:
-    - import_role:
-        name: ceph-defaults
-      tags: ['ceph_update_config']
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-facts
-      tags: ['ceph_update_config']
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-handler
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-common
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-config
-      tags: ['ceph_update_config']
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-prometheus
-      when: dashboard_enabled
-    - import_role:
-        name: ceph-grafana
+    - block:
+        - import_role:
+            name: ceph-defaults
+          tags: ['ceph_update_config']
+        - import_role:
+            name: ceph-facts
+          tags: ['ceph_update_config']
+        - import_role:
+            name: ceph-handler
+        - import_role:
+            name: ceph-common
+        - import_role:
+            name: ceph-config
+          tags: ['ceph_update_config']
+        - import_role:
+            name: ceph-prometheus
+        - import_role:
+            name: ceph-grafana
       when: dashboard_enabled
 
 - hosts: '{{ (groups["mgrs"] | default(groups["mons"]))[0] }}'