From 406dd2880c3ce62173021eb7dc97b124cf60b529 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 15 May 2019 14:11:00 +0200 Subject: [PATCH] playbook: use blocks for grafana-server section use a block in grafana-server section to avoid duplicate condition. Signed-off-by: Guillaume Abrioux (cherry picked from commit be4a5656125cb26589564e5b8b15829da3db414d) --- site-container.yml.sample | 58 ++++++++++++++++++--------------------- site.yml.sample | 41 ++++++++++++--------------- 2 files changed, 44 insertions(+), 55 deletions(-) diff --git a/site-container.yml.sample b/site-container.yml.sample index a76394f5f..044e144f9 100644 --- a/site-container.yml.sample +++ b/site-container.yml.sample @@ -514,41 +514,35 @@ - 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 diff --git a/site.yml.sample b/site.yml.sample index dc717b1f4..6d8fe23cd 100644 --- a/site.yml.sample +++ b/site.yml.sample @@ -507,29 +507,24 @@ - 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] }}'