From: Sébastien Han Date: Mon, 10 Mar 2014 16:23:41 +0000 (+0100) Subject: Remove hardcoded interface name X-Git-Tag: v1.0.0~398^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=620d2d9a14e565877c1fa5cc258fe9d104fe53d1;p=ceph-ansible.git Remove hardcoded interface name Add the ability to select a binding interface for the monitors. Closes: #20 Signed-off-by: Sébastien Han --- diff --git a/group_vars/all b/group_vars/all index 618e2df1f..99bc4a0cb 100644 --- a/group_vars/all +++ b/group_vars/all @@ -11,6 +11,9 @@ redhat_distro: el6 # supported distros are el6, rhel6, f18, f19, opensuse12.2, s cephx: true fsid: 4a158d27-f750-41d5-9e7f-26ce4c9d2d45 +# Monitors options +monitor_interface: eth1 + # OSD options journal_size: 100 pool_default_pg_num: 128 diff --git a/roles/common/templates/ceph.conf.j2 b/roles/common/templates/ceph.conf.j2 index 651c5523a..22b8c5411 100644 --- a/roles/common/templates/ceph.conf.j2 +++ b/roles/common/templates/ceph.conf.j2 @@ -33,7 +33,7 @@ {% for host in groups['mons'] %} [mon.{{ hostvars[host]['ansible_hostname'] }}] host = {{ hostvars[host]['ansible_hostname'] }} - mon addr = {{ hostvars[host]['ansible_eth1']['ipv4']['address'] }} + mon addr = {{ hostvars[host]['ansible_' + monitor_interface ]['ipv4']['address'] }} {% endfor %} [osd]