]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
fs2bs: add a final play
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 13 Apr 2021 12:40:48 +0000 (14:40 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 14 Apr 2021 14:46:31 +0000 (16:46 +0200)
This removes the fact `skipped_nodes` which is useless when we run with
`--limit` since it gets reset when a new iteration is made.

Instead, let's print within a final play which node has been skipped
reusing the `skip_this_node` fact.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3d4267051f03c053dcd7d3f6f381988be0b2939d)

infrastructure-playbooks/filestore-to-bluestore.yml

index e28a7c27a9799d2f75c4daa1f06b8bebf376c4c2..87b32282b674e046e2069b20000274d13d0b0c27 100644 (file)
       set_fact:
         skip_this_node: "{{ ('filestore' in _osd_objectstore and 'bluestore' in _osd_objectstore and not force_filestore_to_bluestore | default(False)) or ('filestore' not in _osd_objectstore) }}"
 
-    - name: add node to skipped node list
-      set_fact:
-        skipped_nodes: "{{ skipped_nodes | default([]) | union([inventory_hostname]) }}"
-      when:
-        - skip_this_node | bool
-
     - name: filestore to bluestore migration workflow
       when: not skip_this_node | bool
       block:
         - import_role:
             name: ceph-osd
 
+- name: final play
+  hosts: "{{ osd_group_name }}"
+  become: true
+  gather_facts: false
+  tasks:
+
+    - import_role:
+        name: ceph-defaults
     - name: report any skipped node during this playbook
       debug:
         msg: |
           "WARNING:"
-          "The following nodes were skipped because OSDs are either"
-          "all bluestore ones or there's a mix of filestore and bluestore OSDs"
-
-          "{{ ' '.join(skipped_nodes) }}"
+          "This node has been skipped because OSDs are either"
+          "all bluestore or there's a mix of filestore and bluestore OSDs"
       when:
-        - inventory_hostname == ansible_play_hosts_all | last
-        - skipped_nodes is defined
+        - skip_this_node | bool
\ No newline at end of file