Commit b03c57ff authored by ale's avatar ale
Browse files

Only dump allowed/available shards for existing services

parent 8813dc2e
......@@ -48,10 +48,10 @@ http_server:
{% macro dump_shards(resource_type, service_group='all') %}
{{ resource_type }}:
{% for h in groups[service_group]|sort %}
{% if hostvars[h].get('shard_id') %}
{% for h in groups.get(service_group, [])|sort if hostvars[h].get('shard_id') %}
- "{{ hostvars[h]['shard_id'] }}"
{% endif %}
{% else %}
- "NONE"
{% endfor %}
{% endmacro %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment