Skip to content

Commit

Permalink
bind to non local ipv4 & ipv6 addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
Marci24h committed Jan 20, 2025
1 parent 4ebd4c4 commit f5a95da
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tasks/sysctl.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
---
# file: roles/haproxy/tasks/sysctl.yml
- name: Enabling/Disabling net.ipv4.ip_nonlocal_bind option
- name: Enabling/Disabling net.ipvX.ip_nonlocal_bind option
tags: [haproxy, haproxy-sysctl]
ansible.posix.sysctl:
name: net.ipv4.ip_nonlocal_bind
name: "{{ item }}"
value: "1"
sysctl_file: /etc/sysctl.d/10-ip_nonlocal_bind.conf
sysctl_set: true
reload: true
state: present
with_items:
- net.ipv4.ip_nonlocal_bind
- net.ipv6.ip_nonlocal_bind
notify: Restart haproxy
when: haproxy_bind_nonlocal_ip | bool

Expand Down

0 comments on commit f5a95da

Please sign in to comment.