Initial commit
[ta/infra-ansible.git] / playbooks / ipv6-config.yml
1 # Copyright 2019 Nokia
2
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 # cmframework.requires: haproxy-install.yml
16 - name: IPv6 Configuration
17   hosts: haproxy
18   tasks:
19     - name: Make haproxy bindable on non local ipv6 addresses
20       sysctl:
21         name: net.ipv6.ip_nonlocal_bind
22         value: 1
23         sysctl_set: yes
24         state: present
25       when: haproxy_bind_on_non_local | bool
26       notify:
27         - Restart haproxy
28   tags:
29     - ipv6_config
30   handlers:
31     - include: /etc/ansible/roles/haproxy_server/handlers/main.yml