2015-07-17 12:20:31 +02:00
|
|
|
---
|
|
|
|
- name: Allowing non-local IP binding
|
|
|
|
sysctl: name="net.ipv4.ip_nonlocal_bind" value=1 sysctl_set=yes
|
2015-11-05 03:27:57 +00:00
|
|
|
when: set_sysctl | bool
|
2015-07-24 14:59:25 +00:00
|
|
|
|
2015-12-18 19:40:48 +00:00
|
|
|
- name: Ensuring config directories exist
|
2015-07-24 14:59:25 +00:00
|
|
|
file:
|
2015-12-18 19:40:48 +00:00
|
|
|
path: "{{ node_config_directory }}/{{ item }}"
|
2015-07-24 14:59:25 +00:00
|
|
|
state: "directory"
|
2015-12-18 19:40:48 +00:00
|
|
|
recurse: yes
|
|
|
|
with_items:
|
|
|
|
- "keepalived"
|
|
|
|
- "haproxy"
|
|
|
|
|
|
|
|
- name: Copying over config.json files for services
|
|
|
|
template:
|
|
|
|
src: "{{ item }}.json.j2"
|
|
|
|
dest: "{{ node_config_directory }}/{{ item }}/config.json"
|
|
|
|
with_items:
|
|
|
|
- "keepalived"
|
|
|
|
- "haproxy"
|
2015-07-24 14:59:25 +00:00
|
|
|
|
2015-12-18 19:40:48 +00:00
|
|
|
- name: Copying over haproxy.cfg
|
2015-09-25 09:19:07 +00:00
|
|
|
template:
|
2015-12-18 19:40:48 +00:00
|
|
|
src: "haproxy.cfg.j2"
|
|
|
|
dest: "{{ node_config_directory }}/haproxy/haproxy.cfg"
|
2015-09-25 09:19:07 +00:00
|
|
|
|
2015-12-18 19:40:48 +00:00
|
|
|
- name: Copying over keepalived.conf
|
2015-07-24 14:59:25 +00:00
|
|
|
template:
|
|
|
|
src: "keepalived.conf.j2"
|
|
|
|
dest: "{{ node_config_directory }}/keepalived/keepalived.conf"
|