mirror of https://github.com/ceph/ceph-ansible.git
facts: fix broken facts when using --limit
This commit fixes these tasks when --limit is used. It makes sure the fact is set on right nodes even when the playbook is run with `--limit` Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/5570/head
parent
2b8ebf1457
commit
f8a951f50c
|
@ -283,14 +283,16 @@
|
||||||
run_once: True
|
run_once: True
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ groups[mon_group_name] if groups[mon_group_name] | default([]) | length > 0 else [] }}"
|
- "{{ groups[mon_group_name] if groups[mon_group_name] | default([]) | length > 0 else [] }}"
|
||||||
- "{{ inventory_hostname }}"
|
- "{{ groups[mds_group_name] if groups[mds_group_name] | default([]) | length > 0 else [] }}"
|
||||||
|
- "{{ groups[client_group_name] if groups[client_group_name] | default([]) | length > 0 else [] }}"
|
||||||
|
|
||||||
- name: set_fact ceph_admin_command
|
- name: set_fact ceph_admin_command
|
||||||
set_fact:
|
set_fact:
|
||||||
ceph_admin_command: "{{ ceph_run_cmd }} -n client.admin -k /etc/ceph/{{ cluster }}.client.admin.keyring"
|
ceph_admin_command: "{{ hostvars[item]['ceph_run_cmd'] }} -n client.admin -k /etc/ceph/{{ cluster }}.client.admin.keyring"
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
run_once: True
|
run_once: True
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ groups[mon_group_name] if groups[mon_group_name] | default([]) | length > 0 else [] }}"
|
- "{{ groups[mon_group_name] if groups[mon_group_name] | default([]) | length > 0 else [] }}"
|
||||||
- "{{ inventory_hostname }}"
|
- "{{ groups[mds_group_name] if groups[mds_group_name] | default([]) | length > 0 else [] }}"
|
||||||
|
- "{{ groups[client_group_name] if groups[client_group_name] | default([]) | length > 0 else [] }}"
|
Loading…
Reference in New Issue