Weidong Shao 224d05cc26 Update cookbooks from Tsinghua's lab
Change-Id: I4e41542e6dfeebcb7c998d7b06b6814b76d3f8b0
2014-10-02 23:28:25 +00:00

28 lines
662 B
Ruby

# fail 'mon_initial_members must be set in config' if node['ceph']['config']['mon_initial_members'].nil?
unless node['ceph']['config']['fsid']
Chef::Log.warn('We are genereting a new uuid for fsid')
require 'securerandom'
node.set['ceph']['config']['fsid'] = SecureRandom.uuid
node.save
end
directory '/etc/ceph' do
owner 'root'
group 'root'
mode '0755'
action :create
end
template '/etc/ceph/ceph.conf' do
source 'ceph.conf.erb'
variables lazy {
{
:mon_addresses => mon_addresses,
:is_rgw => node['ceph']['is_radosgw'],
:is_keystone_integration => node['ceph']['is_keystone_integration']
}
}
mode '0644'
end