purge-container: move facts gathering after ceph-defaults role import

This task has to be called after the role `ceph-defaults` has been
played, otherwise, `mon_group_name` will never be known.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a12de3e048)
pull/3484/head
Guillaume Abrioux 2018-12-12 16:34:14 +01:00 committed by Sébastien Han
parent b9bf7c6703
commit c3bb76b8e9
1 changed files with 9 additions and 1 deletions

View File

@ -318,7 +318,11 @@
setup:
delegate_to: "{{ item }}"
delegate_facts: True
with_items: "{{ groups.get(mon_group_name, 'mons') }}"
with_items: "{{ groups.get(mon_group_name | default('mons')) }}"
- import_role:
name: ceph-facts
private: false
- name: get all the running osds
shell: |
@ -594,6 +598,10 @@
name: ceph-defaults
private: false
- import_role:
name: ceph-facts
private: false
- name: show container list on all the nodes (should be empty)
command: >
docker ps --filter='name=ceph' -a -q