diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-09-25 13:50:16 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-09-25 13:50:16 +0000 |
| commit | 00f35e55907d54bacd291ebaab684d7b26420c37 (patch) | |
| tree | 16007cefaaf79415d97cb6493cfd30581a9a7b99 /ansible | |
| parent | 0f297ed0ee9e9a2eedf8c846e200321fd0070072 (diff) | |
| parent | 89ecfc164ed92696de4c5cd2c0f90f23c1ad3784 (diff) | |
| download | kolla-00f35e55907d54bacd291ebaab684d7b26420c37.tar.gz kolla-00f35e55907d54bacd291ebaab684d7b26420c37.zip | |
Merge "Replace config-external - haproxy keepalived"
Diffstat (limited to 'ansible')
| -rwxr-xr-x | ansible/roles/haproxy/tasks/config.yml | 10 | ||||
| -rwxr-xr-x | ansible/roles/haproxy/tasks/start.yml | 4 | ||||
| -rw-r--r-- | ansible/roles/haproxy/templates/haproxy.json.j2 | 11 | ||||
| -rw-r--r-- | ansible/roles/haproxy/templates/keepalived.json.j2 | 11 |
4 files changed, 34 insertions, 2 deletions
diff --git a/ansible/roles/haproxy/tasks/config.yml b/ansible/roles/haproxy/tasks/config.yml index d71ae7232..633e96c6f 100755 --- a/ansible/roles/haproxy/tasks/config.yml +++ b/ansible/roles/haproxy/tasks/config.yml @@ -10,6 +10,11 @@ src: "haproxy.cfg.j2" dest: "{{ node_config_directory }}/haproxy/haproxy.cfg" +- name: Copying haproxy JSON configuration file + template: + src: "haproxy.json.j2" + dest: "{{ node_config_directory }}/haproxy/config.json" + - name: Allowing non-local IP binding sysctl: name="net.ipv4.ip_nonlocal_bind" value=1 sysctl_set=yes @@ -19,6 +24,11 @@ state: "directory" recurse: "yes" +- name: Copying keepalived JSON configuration file + template: + src: "keepalived.json.j2" + dest: "{{ node_config_directory }}/keepalived/config.json" + - name: Copying over config(s) template: src: "keepalived.conf.j2" diff --git a/ansible/roles/haproxy/tasks/start.yml b/ansible/roles/haproxy/tasks/start.yml index 317c497a1..84a545d2b 100755 --- a/ansible/roles/haproxy/tasks/start.yml +++ b/ansible/roles/haproxy/tasks/start.yml @@ -15,7 +15,7 @@ image: "{{ keepalived_image_full }}" privileged: True volumes: - - "{{ node_config_directory }}/keepalived/:/opt/kolla/keepalived/:ro" + - "{{ node_config_directory }}/keepalived/:/opt/kolla/config_files/:ro" - "/run:/run" - "/lib/modules:/lib/modules:ro" env: @@ -37,7 +37,7 @@ image: "{{ haproxy_image_full }}" privileged: True volumes: - - "{{ node_config_directory }}/haproxy/:/opt/kolla/haproxy/:ro" + - "{{ node_config_directory }}/haproxy/:/opt/kolla/config_files/:ro" - "/run:/run" env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" diff --git a/ansible/roles/haproxy/templates/haproxy.json.j2 b/ansible/roles/haproxy/templates/haproxy.json.j2 new file mode 100644 index 000000000..62a30b3dd --- /dev/null +++ b/ansible/roles/haproxy/templates/haproxy.json.j2 @@ -0,0 +1,11 @@ +{ + "command": "/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid", + "config_files": [ + { + "source": "/opt/kolla/config_files/haproxy.cfg", + "dest": "/etc/haproxy/haproxy.cfg", + "owner": "root", + "perm": "0644" + } + ] +} diff --git a/ansible/roles/haproxy/templates/keepalived.json.j2 b/ansible/roles/haproxy/templates/keepalived.json.j2 new file mode 100644 index 000000000..27ebf7c96 --- /dev/null +++ b/ansible/roles/haproxy/templates/keepalived.json.j2 @@ -0,0 +1,11 @@ +{ + "command": "/usr/sbin/keepalived -nld -p /run/keepalived.pid", + "config_files": [ + { + "source": "/opt/kolla/config_files/keepalived.conf", + "dest": "/etc/keepalived/keepalived.conf", + "owner": "root", + "perm": "0644" + } + ] +} |
