purge-container: fix wrong syntax

we want a default value for `mon_group_name`, not for
`groups[mon_group_name]`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d0b3cb7f85)
pull/3484/head
Guillaume Abrioux 2018-12-12 09:53:32 +01:00 committed by Sébastien Han
parent 0ff1260fc1
commit b9bf7c6703
1 changed files with 6 additions and 7 deletions

View File

@ -308,19 +308,18 @@
gather_facts: true gather_facts: true
become: true become: true
pre_tasks:
- name: gather monitors facts
setup:
delegate_to: "{{ item }}"
delegate_facts: True
with_items: "{{ groups[mon_group_name] | default('mons') }}"
tasks: tasks:
- import_role: - import_role:
name: ceph-defaults name: ceph-defaults
private: false private: false
- name: gather monitors facts
setup:
delegate_to: "{{ item }}"
delegate_facts: True
with_items: "{{ groups.get(mon_group_name, 'mons') }}"
- name: get all the running osds - name: get all the running osds
shell: | shell: |
systemctl list-units | grep 'loaded[[:space:]]\+active' | grep -oE "ceph-osd@([0-9]{1,2}|[a-z]+).service" systemctl list-units | grep 'loaded[[:space:]]\+active' | grep -oE "ceph-osd@([0-9]{1,2}|[a-z]+).service"