Permalink
Browse files

Create /etc/chef before generating config

  • Loading branch information...
1 parent 6117e6c commit 5ede7f6d9b29d5e9487f54a3b641056d1afed06d @ivanvanderbyl ivanvanderbyl committed May 27, 2011
Showing with 5 additions and 6 deletions.
  1. +5 −6 chef-server-bootstrap.rb
View
@@ -65,8 +65,8 @@ def chef_json_path
met?{ File.exists?(chef_json_path) }
meet {
- file = File.open(chef_json_path, "w+") do |file|
- file.write(%({
+ shell("cat > '#{chef_json_path}'",
+ :input => %({
"chef": {
"server_url": "http://localhost:4000",
"server_fqdn": "http://chef.easylodge.com.au",
@@ -76,9 +76,8 @@ def chef_json_path
},
"run_list": [ "recipe[chef::bootstrap_server]" ]
}
- ))
- end
- file.close
- # render_erb 'chef/chef.json.erb', :to => chef_json_path, :perms => '755', :sudo => false
+ ),
+ :sudo => false
+ )
}
}

0 comments on commit 5ede7f6

Please sign in to comment.