From: John Fulton Date: Thu, 6 Feb 2020 02:23:54 +0000 (-0500) Subject: The _filtered_clients list should intersect with ansible_play_batch X-Git-Tag: v4.0.15~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9c97179fc122187200696ff3489ccf2b52d5b0a5;p=ceph-ansible.git The _filtered_clients list should intersect with ansible_play_batch Client configuration with --limit fails without this patch because certain tasks are only done to the first host in the _filtered_clients list and it's likely that first host will not be included in what's sepcified with --limit. To fix this the _filtered_clients list should be built from all clients in the inventory that are also in the running play. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1798781 Signed-off-by: John Fulton (cherry picked from commit e4bf4857f556465c60f89d32d5f2a92d25d5c90f) --- diff --git a/roles/ceph-client/tasks/create_users_keys.yml b/roles/ceph-client/tasks/create_users_keys.yml index 41b261dda..8f6543ad9 100644 --- a/roles/ceph-client/tasks/create_users_keys.yml +++ b/roles/ceph-client/tasks/create_users_keys.yml @@ -19,7 +19,7 @@ add_host: name: "{{ item }}" groups: _filtered_clients - with_items: "{{ groups[client_group_name] }}" + with_items: "{{ groups[client_group_name] | intersect(ansible_play_batch) }}" when: (hostvars[item]['ansible_architecture'] == 'x86_64') or (not containerized_deployment | bool) - name: set_fact delegated_node