when running the playbook with `--limit` option, if for some reason
handlers get triggered, it will fail because `container_exec_cmd` isn't
set on monitors.
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
- name: set_fact container_exec_cmd
set_fact:
container_exec_cmd: "{{ container_binary }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] if not rolling_update else hostvars[mon_host | default(groups[mon_group_name][0])]['ansible_hostname'] }}"
+ delegate_to: "{{ item }}"
+ delegate_facts: True
+ run_once: True
+ with_items: "{{ groups.get(mon_group_name, []) }}"
when:
- containerized_deployment | bool