From 0b26b18e0f9cde0de1c49e35b36246e0f16308c5 Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Thu, 20 May 2021 10:41:35 +0200 Subject: [PATCH] Skip cephadm playbook when there is no mon or nfs group This change just make us able to skip the cephadm playbook when no mons or nfs nodes are defined by the inventory. Change-Id: I1717185ac2394d400e0617ab9aca45088160bcd2 (cherry picked from commit 9642f034bd69c8b2bddd92cd75247516cd3ee2f4) --- deployment/cephadm/ceph-base.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/deployment/cephadm/ceph-base.yaml b/deployment/cephadm/ceph-base.yaml index f93177ad82..f7c18bc95c 100644 --- a/deployment/cephadm/ceph-base.yaml +++ b/deployment/cephadm/ceph-base.yaml @@ -579,10 +579,6 @@ outputs: ms_client_mode: secure - {get_attr: [DefaultCephConfigOverrides, value, vars]} cephadm_extra_vars: {get_attr: [CephAdmVars, value, vars]} - - name: Prepare cephadm user and keys - include_role: - name: tripleo_run_cephadm - tasks_from: enable_ceph_admin_user.yml # This is supposed to run a playbook which is responsible to # deploy Ceph using cephadm. # The storage network is supposed to be available since we are @@ -590,6 +586,14 @@ outputs: # TODO: (fpantano) Remove this section when --network-ports is # available and Ceph deployment can be moved **before** # the overcloud. + - name: Prepare cephadm user and keys + include_role: + name: tripleo_run_cephadm + tasks_from: enable_ceph_admin_user.yml + when: groups['ceph_mon'] | default([]) | length > 0 or + groups['ceph_nfs'] | default([]) | length > 0 - name: Deploy the ceph cluster using cephadm include_role: name: tripleo_run_cephadm + when: groups['ceph_mon'] | default([]) | length > 0 or + groups['ceph_nfs'] | default([]) | length > 0