diff --git a/tasks/keystone_ldap_setup.yml b/tasks/keystone_ldap_setup.yml index 705eb6d9c..6844a2e24 100644 --- a/tasks/keystone_ldap_setup.yml +++ b/tasks/keystone_ldap_setup.yml @@ -26,6 +26,8 @@ delay: 10 with_dict: "{{ keystone_ldap }}" delegate_to: "{{ keystone_service_setup_host }}" + when: + - "inventory_hostname == ((groups['keystone_all'] | intersect(ansible_play_hosts)) | list)[-1]" vars: ansible_python_interpreter: >- {{ (keystone_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }} diff --git a/tasks/main.yml b/tasks/main.yml index b16ef62c0..4497c7eb9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -165,7 +165,6 @@ - include_tasks: keystone_ldap_setup.yml when: - - "inventory_hostname == ((groups['keystone_all'] | intersect(ansible_play_hosts)) | list)[-1]" - "keystone_service_setup | bool" tags: - keystone-config