]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Remove hardcoded interface name 23/head
authorSébastien Han <sebastien.han@enovance.com>
Mon, 10 Mar 2014 16:23:41 +0000 (17:23 +0100)
committerSébastien Han <sebastien.han@enovance.com>
Mon, 10 Mar 2014 16:23:41 +0000 (17:23 +0100)
Add the ability to select a binding interface for the monitors.

Closes: #20
Signed-off-by: Sébastien Han <sebastien.han@enovance.com>
group_vars/all
roles/common/templates/ceph.conf.j2

index 618e2df1f12f0eb6a77ff6228f92ff61320ace0a..99bc4a0cbfffb4bca99498ff47fc64055bdb1b32 100644 (file)
@@ -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
index 651c5523a7ebf34051f3b4a874d5ad27f12679f2..22b8c54110000a7390e08b20c4608b6832a48d5c 100644 (file)
@@ -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]