]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
change template to be more flexible
authorAlexandre Marangone <alexandre.marangone@inktank.com>
Fri, 15 Mar 2013 19:26:23 +0000 (12:26 -0700)
committerAlexandre Marangone <alexandre.marangone@inktank.com>
Wed, 20 Mar 2013 18:34:00 +0000 (11:34 -0700)
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
templates/default/ceph.conf.erb

index ab4d682b669c17c6f6f90b85d3fd170d75cc489d..d2bbc5b78dc94834a734edde2bb073c4aed9564e 100644 (file)
@@ -1,30 +1,35 @@
 [global]
-       auth supported = cephx
-       keyring = /etc/ceph/$cluster.$name.keyring
-
-       # this will be used by all clients to discover the mons to
-       # talk to; this way we don't need to have separate [mon.foo]
-       # sections, and come up with names for the mons just to be
-       # able to list their addresses
-       mon host = <%= @mon_addresses.join(', ') %>
-
-       <% node['ceph']['config'].each do |k, v| %>
+  fsid =  <%= node["ceph"]["config"]["fsid"] %>
+  mon initial members = <%= node["ceph"]["config"]["mon_initial_members"] %>
+  mon host = <%= @mon_addresses.join(', ') %>
+<% if (! node['ceph']['config']['global'].nil?) -%>
+       <% node['ceph']['config']['global'].each do |k, v| %>
        <%= k %> = <%= v %>
        <% end %>
+<% end -%>
+
+<% if (! node['ceph']['config']['osd'].nil?) -%>
+[osd]
+    <% node['ceph']['config']['osd'].each do |k, v| %>
+    <%= k %> = <%= v %>
+    <% end %>
+<% end -%>
 
+<% if (! node['ceph']['config']['mon'].nil?) -%>
 [mon]
-       keyring = /var/lib/ceph/mon/$cluster-$id/keyring
+    <% node['ceph']['config']['mon'].each do |k, v| %>
+    <%= k %> = <%= v %>
+    <% end %>
+<% end -%>
 
+<% if (! node['ceph']['config']['mds'].nil?) -%>
 [mds]
-       keyring = /var/lib/ceph/mds/$cluster-$id/keyring
-
-[osd]
-       keyring = /var/lib/ceph/osd/$cluster-$id/keyring
-       osd journal size = 1000
-       filestore_xattr_use_omap = true
+  <% node['ceph']['config']['mds'].each do |key, value| -%>
+  <%= key %> = <%= value %>
+<%   end -%>
+<% end -%>
 
 <% node['ceph']['config-sections'].each do |name, sect| %>
-
 [<%= name %>]
 <% sect.each do |k, v| %>
 <%= k %> = <%= v %>