capchef 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/History.md +5 -0
  2. data/README.md +5 -1
  3. data/lib/capchef.rb +3 -2
  4. metadata +69 -53
data/History.md CHANGED
@@ -1,6 +1,11 @@
1
1
  capchef Changelog
2
2
  =====================
3
3
 
4
+ 0.0.9
5
+ -----
6
+
7
+ - Allow optional filter on all_nodes call.
8
+
4
9
  0.0.8
5
10
  -----
6
11
 
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
- version: 0.0.8
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 9
9
+ version: 0.0.9
6
10
  platform: ruby
7
11
  authors:
8
- - Brad Pardee
12
+ - Brad Pardee
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
16
 
13
- date: 2011-11-21 00:00:00 Z
17
+ date: 2011-12-13 00:00:00 -05:00
18
+ default_executable:
14
19
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: capistrano
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
24
- type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: json
28
- prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: "0"
35
- type: :runtime
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: minitar
39
- prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: "0"
46
- type: :runtime
47
- version_requirements: *id003
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
- - bradpardee@gmail.com
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
- - lib/capchef.rb
59
- - lib/capchef/chef_recipes.rb
60
- - lib/capchef/utility_recipes.rb
61
- - LICENSE.txt
62
- - Rakefile
63
- - README.md
64
- - History.md
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
- - lib
84
+ - lib
73
85
  required_ruby_version: !ruby/object:Gem::Requirement
74
86
  none: false
75
87
  requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- version: "0"
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
- - !ruby/object:Gem::Version
84
- version: "0"
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.8.9
104
+ rubygems_version: 1.3.7
89
105
  signing_key:
90
106
  specification_version: 3
91
107
  summary: Chef capistrano recipes