Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial import

  • Loading branch information...
commit f16485d15ab53a90fb570b457d121575e2bb300b 0 parents
@mhutter mhutter authored
2  .gitignore
@@ -0,0 +1,2 @@
+node.json
+/cache/
23 cookbooks/main/recipes/default.rb
@@ -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
0  cookbooks/main/templates/default/bashrc.erb
No changes.
8 node.example.json
@@ -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]"]
+}
2  solo.rb
@@ -0,0 +1,2 @@
+cookbook_path File.expand_path("../cookbooks", __FILE__)
+json_attribs File.expand_path("../node.json", __FILE__)
Please sign in to comment.
Something went wrong with that request. Please try again.