Add else and items for loop to monit-dashboard
This commit is contained in:
parent
b80d1e54f5
commit
ec3e35ff9a
|
@ -9,6 +9,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
with_items: groups['frames']
|
||||||
notify:
|
notify:
|
||||||
- restart monit-dashboard
|
- restart monit-dashboard
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"url": "http://127.0.0.1:2812",
|
"url": "http://127.0.0.1:2812",
|
||||||
"user": "{{ monit_web_user }}",
|
"user": "{{ monit_web_user }}",
|
||||||
"passwd": "{{ monit_web_pasword }}"
|
"passwd": "{{ monit_web_pasword }}"
|
||||||
}{{ "," if items is defined and (items|length>0) }}
|
}{{ "," if items is defined and (items|length>0) else "" }}
|
||||||
{% for frame in items %}
|
{% for frame in items %}
|
||||||
"{{ frame.name }}": {
|
"{{ frame.name }}": {
|
||||||
"url": "http://{{ frame.wireguard_address }}:2812",
|
"url": "http://{{ frame.wireguard_address }}:2812",
|
||||||
|
|
Loading…
Reference in a new issue