]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Fix hosts field in rolling_update playbook when mds are processed
authorFrancesco Pantano <fpantano@redhat.com>
Tue, 8 Sep 2020 11:16:33 +0000 (13:16 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 9 Sep 2020 12:53:44 +0000 (14:53 +0200)
In the OSP context, during the rolling update the playbook fails
with the following error:

'''
ERROR! The field 'hosts' has an invalid value, which includes an
undefined variable. The error was: list object has no element 0
'''

This PR just change the hosts field providing a valid mons group
value.

Closes: https://bugzilla.redhat.com/1876803
Signed-off-by: Francesco Pantano <fpantano@redhat.com>
(cherry picked from commit e65f9a5c720eeeef72b6eef59bb239e6ed04cdbe)

infrastructure-playbooks/rolling_update.yml

index ee512e8569c8b611d8f4d0c32bf44e59f6c6e5f0..36b4beb02fafc1842d3068fbc355a2d0913199be 100644 (file)
         - nodeep-scrub
 
 - name: upgrade ceph mdss cluster, deactivate all rank > 0
-  hosts: "{{ groups[mon_group_name|default('mons')][0] }}"
+  hosts: "{{ mon_group_name | default('mons') }}[0]"
   become: true
   tasks:
     - name: deactivate all mds rank > 0