27 lines
710 B
Django/Jinja
27 lines
710 B
Django/Jinja
{% for script in keepalived_scripts %}
|
|
vrrp_script {{ script.name }} {
|
|
script "{{ script.script }}"
|
|
interval {{ script.interval }}
|
|
weight {{ script.weight }}
|
|
}
|
|
{% endfor %}
|
|
|
|
{% for instance in keepalived_instances %}
|
|
vrrp_instance {{ instance.name }} {
|
|
interface {{ instance.interface }}
|
|
state {{ instance.state }}
|
|
virtual_router_id {{ instance.vrouter_id }}
|
|
priority {{ instance.priority }}
|
|
virtual_ipaddress {
|
|
{% for addr in instance.v_addr %}
|
|
{{ addr }}
|
|
{% endfor %}
|
|
}
|
|
track_script {
|
|
{% for trk in instance.track_script %}
|
|
{{ trk }}
|
|
{% endfor %}
|
|
}
|
|
}
|
|
{% endfor %}
|