From 658d9cadfd156e1bce25e25c6e2620954a934605 Mon Sep 17 00:00:00 2001 From: John Fulton Date: Wed, 5 Feb 2020 21:23:54 -0500 Subject: [PATCH] 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) --- roles/ceph-client/tasks/create_users_keys.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/roles/ceph-client/tasks/create_users_keys.yml b/roles/ceph-client/tasks/create_users_keys.yml index d8165d0b1..c2a89f562 100644 --- a/roles/ceph-client/tasks/create_users_keys.yml +++ b/roles/ceph-client/tasks/create_users_keys.yml @@ -21,9 +21,8 @@ add_host: name: "{{ item }}" groups: _filtered_clients - with_items: "{{ groups[client_group_name] }}" - when: - - (hostvars[item]['ansible_architecture'] == 'x86_64') or (not containerized_deployment) + with_items: "{{ groups[client_group_name] | intersect(ansible_play_batch) }}" + when: (hostvars[item]['ansible_architecture'] == 'x86_64') or (not containerized_deployment | bool) - name: run a dummy container (sleep 300) from where we can create pool(s)/key(s) command: > -- 2.47.3