diff --git a/ansible/roles/haproxy/tasks/config.yml b/ansible/roles/haproxy/tasks/config.yml index efa47eb707..f6f9caa3ce 100644 --- a/ansible/roles/haproxy/tasks/config.yml +++ b/ansible/roles/haproxy/tasks/config.yml @@ -4,6 +4,7 @@ become: true with_items: - { name: "net.ipv4.ip_nonlocal_bind", value: 1} + - { name: "net.ipv6.ip_nonlocal_bind", value: 1} - { name: "net.unix.max_dgram_qlen", value: 128} when: - set_sysctl | bool diff --git a/ansible/roles/haproxy/tasks/precheck.yml b/ansible/roles/haproxy/tasks/precheck.yml index 0228fb8581..8985c1007a 100644 --- a/ansible/roles/haproxy/tasks/precheck.yml +++ b/ansible/roles/haproxy/tasks/precheck.yml @@ -103,13 +103,15 @@ - hostvars[inventory_hostname]['ansible_' + kolla_external_vip_interface]['active'] != True - name: Checking if kolla_internal_vip_address and kolla_external_vip_address are not pingable from any node - command: ping -c 3 {{ item }} + command: "{{ item.command }} -c 3 {{ item.address }}" register: ping_output changed_when: false failed_when: ping_output.rc != 1 with_items: - - "{{ kolla_internal_vip_address }}" - - "{{ kolla_external_vip_address }}" + - address: "{{ kolla_internal_vip_address }}" + command: "{{ 'ping' if kolla_internal_vip_address|ipv4 else 'ping6' }}" + - address: "{{ kolla_external_vip_address }}" + command: "{{ 'ping' if kolla_external_vip_address|ipv4 else 'ping6' }}" when: - enable_keepalived | bool - "host_running_keepalived == 'None'" @@ -153,7 +155,7 @@ - api_interface_address != kolla_internal_vip_address - name: Checking if kolla_internal_vip_address is in the same network as api_interface on all nodes - command: ip -4 -o addr show dev {{ api_interface }} + command: ip -o addr show dev {{ api_interface }} register: ip_addr_output changed_when: false failed_when: >-