]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
The _filtered_clients list should intersect with ansible_play_batch
authorJohn Fulton <fulton@redhat.com>
Thu, 6 Feb 2020 02:23:54 +0000 (21:23 -0500)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 17 Feb 2020 10:29:18 +0000 (11:29 +0100)
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 <fulton@redhat.com>
roles/ceph-client/tasks/create_users_keys.yml

index 41b261ddadda4fa6336a25e8bb61add0521fb346..8f6543ad9568a5f7faf94f9e7b8179afb7be66e4 100644 (file)
@@ -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