From: Guilhem Lettron Date: Tue, 9 Apr 2013 13:32:17 +0000 (+0200) Subject: remove useless create file from chef value, read variable, create file, remove file... X-Git-Tag: v0.2.0~32^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F23%2Fhead;p=ceph-cookbooks.git remove useless create file from chef value, read variable, create file, remove file... You forget to fax it --- diff --git a/recipes/osd.rb b/recipes/osd.rb index 9608227..526d083 100644 --- a/recipes/osd.rb +++ b/recipes/osd.rb @@ -73,21 +73,9 @@ else # TODO cluster name cluster = 'ceph' - file "/var/lib/ceph/bootstrap-osd/#{cluster}.keyring.raw" do - owner "root" - group "root" - mode "0440" - content mons[0]["ceph_bootstrap_osd_key"] - end - execute "format as keyring" do - command <<-EOH - set -e - # TODO don't put the key in "ps" output, stdout - read KEY <'/var/lib/ceph/bootstrap-osd/#{cluster}.keyring.raw' - ceph-authtool '/var/lib/ceph/bootstrap-osd/#{cluster}.keyring' --create-keyring --name=client.bootstrap-osd --add-key="$KEY" - rm -f '/var/lib/ceph/bootstrap-osd/#{cluster}.keyring.raw' - EOH + command "ceph-authtool '/var/lib/ceph/bootstrap-osd/#{cluster}.keyring' --create-keyring --name=client.bootstrap-osd --add-key='#{mons[0]["ceph_bootstrap_osd_key"]}'" + creates "/var/lib/ceph/bootstrap-osd/#{cluster}.keyring" end if is_crowbar?