log_level = "{{ consul_conf.log_level }}"

node_meta {
{% for meta in consul_conf.node_meta.keys() | list %}
  {{ meta }} = "{{ consul_conf.node_meta[meta] }}"
{% endfor %}
}

{% for service in consul_catalog_services.keys() | list %}
services {
  id = "{{ service }}"
  name = "{{ consul_catalog_services[service].name }}"
  address = "{{ consul_catalog_services[service].address }}"
  port = {{ consul_catalog_services[service].port }}
{% if consul_catalog_services[service].token is defined %}
  token = "{{ consul_catalog_services[service].token }}"
{% endif %}
}
{% endfor %}

