chef-sandwich 0.1.0pre → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.md +51 -2
- data/lib/sandwich/version.rb +1 -1
- metadata +10 -7
data/LICENSE
CHANGED
@@ -187,7 +187,7 @@
|
|
187
187
|
same "printed page" as the copyright notice for easier
|
188
188
|
identification within third-party archives.
|
189
189
|
|
190
|
-
Copyright
|
190
|
+
Copyright 2011 Sebastian Boehm
|
191
191
|
|
192
192
|
Licensed under the Apache License, Version 2.0 (the "License");
|
193
193
|
you may not use this file except in compliance with the License.
|
data/README.md
CHANGED
@@ -6,12 +6,61 @@ The easiest way to get started as a [chef](http://www.opscode.com/chef/).
|
|
6
6
|
Documentation
|
7
7
|
-------------
|
8
8
|
|
9
|
-
|
9
|
+
Sandwich is the easiest way to get started with [Chef](http://www.opscode.com/chef/), a Ruby-based configuration management tool.
|
10
10
|
|
11
|
-
|
11
|
+
Sandwich lets you apply Chef recipes to your system without having to worry about setting up cookbooks, runlists or any configuration at all. Using Sandwich you can run Chef recipes the way you would run shell scripts: by piping recipes directly to Sandwich or running recipe files locally.
|
12
|
+
|
13
|
+
For example, installing the package `htop` works like this:
|
12
14
|
|
13
15
|
echo "package 'htop'" | sudo sandwich
|
14
16
|
|
17
|
+
If you wanted to install zsh, make it the default shell for root and add a simple alias (without overwriting the existing zshrc), you could do something like this:
|
18
|
+
|
19
|
+
cat << EOF | sudo sandwich -l info
|
20
|
+
package "zsh"
|
21
|
+
|
22
|
+
user "root" do
|
23
|
+
shell "/bin/zsh"
|
24
|
+
end
|
25
|
+
|
26
|
+
file "/root/.zshrc" do
|
27
|
+
content "alias ll='ls -l'"
|
28
|
+
not_if { File.exist? "/root/.zshrc" }
|
29
|
+
end
|
30
|
+
EOF
|
31
|
+
|
32
|
+
(Yes, you can just copy & paste this. Go ahead, I'll be waiting.)
|
33
|
+
|
34
|
+
Sandwich even makes managing cron jobs easy. Say you want to generate a new signature file `~/.signature.sample` every day at 4:02 AM by running `fortune` and ensure fortune is actually installed, the recipe would look something like this:
|
35
|
+
|
36
|
+
cat <<EOF > fortune-signature.rb
|
37
|
+
package "fortunes-bofh-excuses"
|
38
|
+
cron "email-signature" do
|
39
|
+
hour "4"
|
40
|
+
minute "02"
|
41
|
+
user ENV['SUDO_USER']
|
42
|
+
command "fortune bofh-excuses > ~/.signature.sample"
|
43
|
+
end
|
44
|
+
EOF
|
45
|
+
sudo sandwich -l info -f fortune-signature.rb
|
46
|
+
|
47
|
+
Installation
|
48
|
+
------------
|
49
|
+
|
50
|
+
sudo gem install chef-sandwich
|
51
|
+
|
52
|
+
Limitations
|
53
|
+
-----------
|
54
|
+
|
55
|
+
Sandwich does not yet properly handle `cookbook_file` and `template` resources. It's on my TODO list, don't worry.
|
56
|
+
|
57
|
+
Extras
|
58
|
+
------
|
59
|
+
|
60
|
+
For a more in depth description of Chef's resources, see [Chef Resources](http://wiki.opscode.com/display/chef/Resources).
|
61
|
+
|
62
|
+
Note: Sandwiches with a side of [rocco](https://github.com/rtomayko/rocco) help aspiring chefs to share their recipes.
|
63
|
+
|
15
64
|
Copyright
|
16
65
|
---------
|
17
66
|
|
data/lib/sandwich/version.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-sandwich
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 0.1.
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Sebastian Boehm
|
@@ -10,11 +10,14 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-08-09 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
17
|
-
description:
|
17
|
+
description: |
|
18
|
+
Sandwich lets you apply Chef recipes to your system without having to
|
19
|
+
worry about cookbooks or configuration.
|
20
|
+
|
18
21
|
email: sebastian@sometimesfood.org
|
19
22
|
executables:
|
20
23
|
- sandwich
|
@@ -33,7 +36,7 @@ files:
|
|
33
36
|
- lib/sandwich/version.rb
|
34
37
|
- lib/sandwich.rb
|
35
38
|
has_rdoc: true
|
36
|
-
homepage: https://github.com/sometimesfood/sandwich
|
39
|
+
homepage: https://github.com/sometimesfood/sandwich
|
37
40
|
licenses: []
|
38
41
|
|
39
42
|
post_install_message:
|
@@ -50,9 +53,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
50
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
54
|
none: false
|
52
55
|
requirements:
|
53
|
-
- - "
|
56
|
+
- - ">="
|
54
57
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
58
|
+
version: "0"
|
56
59
|
requirements: []
|
57
60
|
|
58
61
|
rubyforge_project:
|