update: skip mds deactivation when no mds in inventory

Let's skip this part of the code if there's no mds node in the
inventory.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/4660/head
Guillaume Abrioux 2019-10-23 15:48:32 +02:00 committed by Dimitri Savineau
parent d050391cbb
commit 5ec906c3af
1 changed files with 63 additions and 60 deletions

View File

@ -541,6 +541,9 @@
hosts: "{{ groups[mon_group_name|default('mons')][0] }}"
become: true
tasks:
- name: deactivate all mds rank > 0
when: groups.get(mds_group_name, []) | length > 1
block:
- import_role:
name: ceph-defaults
- import_role:
@ -614,7 +617,7 @@
- name: upgrade active mds
vars:
upgrade_ceph_packages: True
hosts: active_mdss
hosts: active_mdss | default([])
become: true
tasks:
- import_role: