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 }}' - '{{ keepalived_floating_ip1 }}'
track_script: track_script:
- '{{ keepalived_script1_name }}' - '{{ keepalived_script1_name }}'
#track_interface:
# - eth0

View File

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