Deep scan config
This commit is contained in:
parent
53cee1b3cd
commit
63c49d7431
1 changed files with 10 additions and 2 deletions
|
@ -4,8 +4,16 @@
|
||||||
{% for service in consul.register %}
|
{% for service in consul.register %}
|
||||||
{
|
{
|
||||||
{% for key, value in service.items() %}
|
{% for key, value in service.items() %}
|
||||||
{% if key == 'script' %}
|
{% if key == 'checks' %}
|
||||||
"{{ script }}": "/opt/consul/scripts/"{{ value.split('/')[-1] }}{% if not loop.last %},{% endif %}
|
"checks": [
|
||||||
|
{% for key2, value2 in value.items() %}
|
||||||
|
{% if key2 == 'script' %}
|
||||||
|
"script": /opt/consul/scripts/{{ value2.split('/')[-1] }}{% if not loop.last %},{% endif %}
|
||||||
|
{% else %}
|
||||||
|
"{{ key2 }}": {{ value2 | json}}{% if not loop.last %},{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
]{% if not loop.last %},{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
"{{ key }}": {{ value | json}}{% if not loop.last %},{% endif %}
|
"{{ key }}": {{ value | json}}{% if not loop.last %},{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue