From: Guillaume Abrioux Date: Fri, 26 Mar 2021 15:12:42 +0000 (+0100) Subject: update: followup on 07029e1 X-Git-Tag: v6.0.3~16 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=000b203ebf2c745674d1d8669bb7549ba99e761a;p=ceph-ansible.git update: followup on 07029e1 Playbook must fail anyway, the `rescue` block has been introduced for unmasking the unit after the playbook has failed. Signed-off-by: Guillaume Abrioux (cherry picked from commit e9ddb972fef5ab73e3a6f4f95f451ae223dcf64c) --- diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 3e7009b86..ae14fbfd7 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -271,12 +271,9 @@ rescue: - name: unmask the mon service systemd: - name: ceph-mon@{{ item }} + name: ceph-mon@{{ ansible_facts['hostname'] }} enabled: yes masked: no - with_items: - - "{{ ansible_facts['hostname'] }}" - - "{{ ansible_facts['fqdn'] }}" - name: unmask the mgr service systemd: @@ -285,6 +282,10 @@ when: inventory_hostname in groups[mgr_group_name] | default([]) or groups[mgr_group_name] | default([]) | length == 0 + - name: stop the playbook execution + fail: + msg: "There was an error during monitor upgrade. Please, check the previous task results." + - name: reset mon_host hosts: "{{ mon_group_name|default('mons') }}" become: True