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
d0b3cb7f851ece584da47af65c4416ad93541065)
gather_facts: 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:
- import_role:
name: ceph-defaults
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
shell: |
systemctl list-units | grep 'loaded[[:space:]]\+active' | grep -oE "ceph-osd@([0-9]{1,2}|[a-z]+).service"