Merge branch 'master' of gitorious.research-infrastructures.eu:infrastructure-management/ansible-playbooks

This commit is contained in:
Roberto Cirillo 2016-10-13 16:46:55 +02:00
commit 2c1ee770b2
2 changed files with 17 additions and 3 deletions

View File

@ -37,4 +37,5 @@ keepalived_instances:
- '{{ keepalived_floating_ip1 }}'
track_script:
- '{{ keepalived_script1_name }}'
#track_interface:
# - eth0

View File

@ -1,8 +1,11 @@
{% for script in keepalived_scripts %}
vrrp_script {{ script.name }} {
script "{{ script.script }}"
interval {{ script.interval }}
weight {{ script.weight }}
interval {{ script.interval | default(1) }}
weight {{ script.weight | default(2) }}
fall: {{ script.fall | default(3) }}
raise: {{ script.raise | default(2) }}
timeout: {{ script.timeout | default(5) }}
}
{% endfor %}
@ -17,6 +20,9 @@ vrrp_instance {{ instance.name }} {
{% if instance.notify is defined %}
notify {{ instance.notify }}
{% endif %}
{% if instance.nopreempt is defined and instance.nopreempt %}
nopreempt
{% endif %}
{% if instance.authentication is defined %}
authentication {
auth_type {{ instance.authentication }}
@ -32,5 +38,12 @@ vrrp_instance {{ instance.name }} {
{{ trk }}
{% endfor %}
}
{% if instance.track_interface is defined %}
track_interface {
{% for if in instance.track_interface %}
{{ if }}
{% endfor %}
}
{% endif %}
}
{% endfor %}