From a59845bb6906eb6c90318ef2284014e90f377052 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 11 Aug 2020 14:00:36 +0200 Subject: [PATCH] facts: enforce container_exec_cmd fact on mons 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 --- roles/ceph-facts/tasks/facts.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/ceph-facts/tasks/facts.yml b/roles/ceph-facts/tasks/facts.yml index 2dcd35131..602daa1ce 100644 --- a/roles/ceph-facts/tasks/facts.yml +++ b/roles/ceph-facts/tasks/facts.yml @@ -39,6 +39,10 @@ - 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 -- 2.39.5