Skip to content

Commit

Permalink
Merge pull request #119 from MartinVerges/croit-updates
Browse files Browse the repository at this point in the history
add ipv6.ip_nonlocal_bind, group track_scripts
  • Loading branch information
evrardjp authored Oct 24, 2019
2 parents 8bbfc28 + addbf7a commit 1c62afa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@

- name: Allow consuming apps to bind on non local addresses
sysctl:
name: net.ipv4.ip_nonlocal_bind
name: "{{ item }}"
value: 1
sysctl_set: yes
state: present
when: keepalived_bind_on_non_local | bool
with_items:
- "net.ipv4.ip_nonlocal_bind"
- "net.ipv6.ip_nonlocal_bind"
tags:
- keepalived-install

Expand Down
10 changes: 10 additions & 0 deletions templates/keepalived.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ vrrp_sync_group {{ name }} {
{% if sync_group.notify_fault is defined %}
notify_fault "{{ sync_group.notify_fault }}"
{% endif %}
{% if sync_group.track_scripts is defined %}
track_script {
{% for track_script in sync_group.track_scripts %}
{{ track_script }}
{% endfor %}
}
{% endif %}
}
{% endfor %}

Expand All @@ -56,6 +63,9 @@ vrrp_script {{ name }} {
{% if details.timeout is defined %}
timeout {{ details.timeout }} # allow scripts like ping to succeed, before timing out
{% endif %}
{% if details.user is defined %}
user {{ details.user }} # user/group names to run script under.
{% endif %}
}
{% endfor %}
{% endif %}
Expand Down

0 comments on commit 1c62afa

Please sign in to comment.