From b34ead54572c1fbe5220eac72019640d4c37f485 Mon Sep 17 00:00:00 2001 From: Jimmy Tang Date: Sun, 16 Mar 2014 09:43:49 +0000 Subject: [PATCH] make radosgw_interface configurable for haproxy --- group_vars/all | 1 + roles/haproxy/templates/precise/haproxy.cfg | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/group_vars/all b/group_vars/all index 7caa4846d..22e46b047 100644 --- a/group_vars/all +++ b/group_vars/all @@ -20,6 +20,7 @@ mds: true # disable mds configuration in ceph.conf # Rados Gateway options radosgw: true redhat_distro_ceph_extra: centos6.4 # supported distros are centos6.3, centos6.4, centos6, fedora18, fedora19, opensuse12.2, rhel6.3, rhel6.4, rhel6.5, rhel6, sles11sp2 +radosgw_interface: eth1 # OSD options journal_size: 100 diff --git a/roles/haproxy/templates/precise/haproxy.cfg b/roles/haproxy/templates/precise/haproxy.cfg index 058821e63..55f2e4812 100644 --- a/roles/haproxy/templates/precise/haproxy.cfg +++ b/roles/haproxy/templates/precise/haproxy.cfg @@ -46,7 +46,7 @@ backend rgw balance roundrobin cookie RADOSGWLB insert indirect nocache {% for host in groups['rgws'] %} - server {{ hostvars[host].ansible_hostname }} {{ hostvars[host]['ansible_eth0'].ipv4.address }}:80 check cookie {{ hostvars[host].ansible_hostname }} + server {{ hostvars[host].ansible_hostname }} {{ hostvars[host]['ansible_' + radosgw_interface ].ipv4.address }}:80 check cookie {{ hostvars[host].ansible_hostname }} {% endfor %} listen stats :8080 -- 2.39.5