diff --git a/tasks/main.yml b/tasks/main.yml index c7c58f1e..05e64dd2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -147,7 +147,7 @@ _service_users: "{{ ironic_service_user_list }}" _service_endpoints: "{{ ironic_service_endpoint_list }}" _service_catalog: "{{ ironic_service_catalog_list }}" - when: inventory_hostname == groups['ironic_api'][0] + when: (inventory_hostname == groups['ironic_api'][0] or inventory_hostname == groups['ironic_inspector'][0]) tags: - ironic-config diff --git a/vars/main.yml b/vars/main.yml index 3f58b9cc..aa1eb5b5 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -210,7 +210,7 @@ ironic_service_endpoint_list: > ) %} {%- endif %} - {%- if inventory_hostname in groups['ironic_inspector'] %} + {%- if ironic_services['ironic-inspector']['group'] in group_names %} {%- set _ = service_endpoint_list.append( { 'service': ironic_inspector_service_name, @@ -250,7 +250,7 @@ ironic_service_catalog_list: > ) %} {%- endif %} - {%- if inventory_hostname in groups['ironic_inspector'] %} + {%- if ironic_services['ironic-inspector']['group'] in group_names %} {%- set _ = service_catalog_list.append( { 'name': ironic_inspector_service_name,