]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rolling_update: fix rbd-mirror play
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 3 Aug 2022 07:09:15 +0000 (09:09 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 3 Aug 2022 11:09:42 +0000 (13:09 +0200)
There's no service to stop/mask when the node being upgraded is
a 'primary node' only (1 way replication).

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/rolling_update.yml

index 4532d4998b194a3c821822a4cd13f5da1acef8c8..b9feaac7a40384a2013430feededa7acf4d4a383 100644 (file)
   become: True
   gather_facts: false
   tasks:
+    - name: check for ceph rbd mirror services
+      command: systemctl show --no-pager --property=Id --state=enabled ceph-rbd-mirror@*  # noqa 303
+      changed_when: false
+      register: rbdmirror_services
+
     - name: stop ceph rbd mirror
-      systemd:
-        name: "ceph-rbd-mirror@rbd-mirror.{{ ansible_facts['hostname'] }}"
+      service:
+        name: "{{ item.split('=')[1] }}"
         state: stopped
         enabled: no
         masked: yes
+      loop: "{{ rbdmirror_services.stdout_lines }}"
 
     - import_role:
         name: ceph-defaults