capchef 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +5 -0
- data/README.md +5 -1
- data/lib/capchef.rb +3 -2
- metadata +69 -53
data/History.md
CHANGED
data/README.md
CHANGED
@@ -38,7 +38,7 @@ Your Capfile might look something like the following:
|
|
38
38
|
# Uncomment the following if running scripts under sudo isn't allowed
|
39
39
|
#Capchef.use_sudo = false
|
40
40
|
|
41
|
-
role :node, *Capchef.all_nodes
|
41
|
+
role :node, *Capchef.all_nodes(ENV['NODE_FILTER'])
|
42
42
|
|
43
43
|
# Define the path to the chef-solo executable if it's not in /usr/bin or /usr/local/bin
|
44
44
|
set :chef_solo_path, '/opt/ruby/bin'
|
@@ -68,6 +68,10 @@ Then you can install to your hosts with the following command:
|
|
68
68
|
|
69
69
|
cap chef
|
70
70
|
|
71
|
+
Or just to your web servers with a command like (filters by regex matching the node names):
|
72
|
+
|
73
|
+
NODE_FILTER=web cap chef
|
74
|
+
|
71
75
|
## To Do
|
72
76
|
|
73
77
|
Currently all recipes get rerun whenever you perform a 'cap chef'. I could probably get around this with an option to
|
data/lib/capchef.rb
CHANGED
@@ -96,8 +96,9 @@ module Capchef
|
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
99
|
-
def all_nodes
|
99
|
+
def all_nodes(filter=nil)
|
100
100
|
return [] if @config_pass && @config_pass > 1
|
101
|
+
return nodes_config.keys.grep(Regexp.new(filter)) if filter
|
101
102
|
return nodes_config.keys
|
102
103
|
end
|
103
104
|
|
@@ -123,4 +124,4 @@ module Capchef
|
|
123
124
|
ensure
|
124
125
|
cap.run "rm -rf #{script_dir}", options unless ENV['CAPCHEF_KEEP_TEMP']
|
125
126
|
end
|
126
|
-
end
|
127
|
+
end
|
metadata
CHANGED
@@ -1,53 +1,64 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capchef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 9
|
9
|
+
version: 0.0.9
|
6
10
|
platform: ruby
|
7
11
|
authors:
|
8
|
-
|
12
|
+
- Brad Pardee
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
16
|
|
13
|
-
date: 2011-
|
17
|
+
date: 2011-12-13 00:00:00 -05:00
|
18
|
+
default_executable:
|
14
19
|
dependencies:
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: capistrano
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
31
|
+
type: :runtime
|
32
|
+
version_requirements: *id001
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: json
|
35
|
+
prerelease: false
|
36
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
version: "0"
|
44
|
+
type: :runtime
|
45
|
+
version_requirements: *id002
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: minitar
|
48
|
+
prerelease: false
|
49
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
version: "0"
|
57
|
+
type: :runtime
|
58
|
+
version_requirements: *id003
|
48
59
|
description: Chef capistrano recipes so you can configure your machines without a server
|
49
60
|
email:
|
50
|
-
|
61
|
+
- bradpardee@gmail.com
|
51
62
|
executables: []
|
52
63
|
|
53
64
|
extensions: []
|
@@ -55,13 +66,14 @@ extensions: []
|
|
55
66
|
extra_rdoc_files: []
|
56
67
|
|
57
68
|
files:
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
69
|
+
- lib/capchef/chef_recipes.rb
|
70
|
+
- lib/capchef/utility_recipes.rb
|
71
|
+
- lib/capchef.rb
|
72
|
+
- LICENSE.txt
|
73
|
+
- Rakefile
|
74
|
+
- README.md
|
75
|
+
- History.md
|
76
|
+
has_rdoc: true
|
65
77
|
homepage: http://github.com/ClarityServices/capchef
|
66
78
|
licenses: []
|
67
79
|
|
@@ -69,23 +81,27 @@ post_install_message:
|
|
69
81
|
rdoc_options: []
|
70
82
|
|
71
83
|
require_paths:
|
72
|
-
|
84
|
+
- lib
|
73
85
|
required_ruby_version: !ruby/object:Gem::Requirement
|
74
86
|
none: false
|
75
87
|
requirements:
|
76
|
-
|
77
|
-
|
78
|
-
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
version: "0"
|
79
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
94
|
none: false
|
81
95
|
requirements:
|
82
|
-
|
83
|
-
|
84
|
-
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
version: "0"
|
85
101
|
requirements: []
|
86
102
|
|
87
103
|
rubyforge_project:
|
88
|
-
rubygems_version: 1.
|
104
|
+
rubygems_version: 1.3.7
|
89
105
|
signing_key:
|
90
106
|
specification_version: 3
|
91
107
|
summary: Chef capistrano recipes
|