Permalink
Browse files

initial import

  • Loading branch information...
0 parents commit f16485d15ab53a90fb570b457d121575e2bb300b @mhutter mhutter committed May 8, 2012
Showing with 35 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +23 −0 cookbooks/main/recipes/default.rb
  3. 0 cookbooks/main/templates/default/bashrc.erb
  4. +8 −0 node.example.json
  5. +2 −0 solo.rb
@@ -0,0 +1,2 @@
+node.json
+/cache/
@@ -0,0 +1,23 @@
+package "git-core"
+
+group "admin"
+user node[:user][:name] do
+ password node[:user][:password]
+ gid "admin"
+ home "/home/#{node[:user][:name]}"
+ supports manage_home: true
+ shell "/bin/bash"
+end
+
+template "/home/#{node[:user][:name]}/.bashrc" do
+ source "bashrc.erb"
+ owner node[:user][:name]
+end
+
+if node[:user][:authorized_keys]
+ file "/home/#{node[:user][:name]}/.ssh/authorized_keys" do
+ owner node[:user][:name]
+ mode "600"
+ content node[:user][:authorized_keys]
+ end
+end
No changes.
@@ -0,0 +1,8 @@
+{
+ "user": {
+ "name": "username",
+ "password": "crypted with `openssl passwd -1 'super sekrit password'`",
+ "authorized_keys": "the content for your ~/.ssh/authorized_keys"
+ },
+ "run_list": ["recipe[main]"]
+}
@@ -0,0 +1,2 @@
+cookbook_path File.expand_path("../cookbooks", __FILE__)
+json_attribs File.expand_path("../node.json", __FILE__)

0 comments on commit f16485d

Please sign in to comment.