]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
remove useless create file from chef value, read variable, create file, remove file... 23/head
authorGuilhem Lettron <guilhem@lettron.fr>
Tue, 9 Apr 2013 13:32:17 +0000 (15:32 +0200)
committerGuilhem Lettron <guilhem@lettron.fr>
Tue, 9 Apr 2013 13:32:17 +0000 (15:32 +0200)
You forget to fax it

recipes/osd.rb

index 960822775efcc46ba91dcea6aed0fd6ee261f4dc..526d08312d29bfe4156b39937db97dca78ad503e 100644 (file)
@@ -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?