{ "dispatcher": { "url": "http://127.0.0.1:2812", "user": "{{ monit_web_user }}", "passwd": "{{ monit_web_pasword }}" }{{ "," if items is defined and (items|length>0) }} {% for frame in items %} "{{ frame.name }}": { "url": "http://{{ frame.wireguard_address }}:2812", "user": "{{ frame.monit_web_user }}", "passwd": "{{ frame.monit_web_pasword }}" }{{ "," if not loop.last }} {% endfor %} }