If you use python3 based ansible then keys() returns a dict_keys object,
not a list of keys. This breaks the installation on such a system. Using
the list filter provides a more robust solution that should work on both
python2 and python3 based ansible. You can find some more information
about the issue, here:
https://github.com/ansible/ansible/issues/19514
Signed-off-by: Boris Ranto <branto@redhat.com>
state: started
enabled: yes
daemon_reload: yes
- with_items: "{{ devices if osd_scenario != 'lvm' else (ceph_osd_ids.stdout | from_json).keys() }}"
+ with_items: "{{ devices if osd_scenario != 'lvm' else (ceph_osd_ids.stdout | from_json | list) }}"
- name: ensure systemd service override directory exists
file:
config_type: "ini"
when:
- ceph_osd_systemd_overrides is defined
- - ansible_service_mgr == 'systemd'
\ No newline at end of file
+ - ansible_service_mgr == 'systemd'