mirror of https://github.com/ceph/ceph-ansible.git
fs2bs: add a final play
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 3d4267051f
)
pull/6466/head
parent
64815ce7ac
commit
fd0da6f43c
|
@ -67,12 +67,6 @@
|
||||||
set_fact:
|
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) }}"
|
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
|
- name: filestore to bluestore migration workflow
|
||||||
when: not skip_this_node | bool
|
when: not skip_this_node | bool
|
||||||
block:
|
block:
|
||||||
|
@ -432,14 +426,19 @@
|
||||||
- import_role:
|
- import_role:
|
||||||
name: ceph-osd
|
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
|
- name: report any skipped node during this playbook
|
||||||
debug:
|
debug:
|
||||||
msg: |
|
msg: |
|
||||||
"WARNING:"
|
"WARNING:"
|
||||||
"The following nodes were skipped because OSDs are either"
|
"This node has been skipped because OSDs are either"
|
||||||
"all bluestore ones or there's a mix of filestore and bluestore OSDs"
|
"all bluestore or there's a mix of filestore and bluestore OSDs"
|
||||||
|
|
||||||
"{{ ' '.join(skipped_nodes) }}"
|
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == ansible_play_hosts_all | last
|
- skip_this_node | bool
|
||||||
- skipped_nodes is defined
|
|
Loading…
Reference in New Issue