soloist 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -1
- data/README.markdown +17 -0
- data/lib/soloist/chef_config_generator.rb +2 -1
- data/lib/soloist/version.rb +1 -1
- data/spec/chef_config_generator_spec.rb +6 -0
- metadata +5 -5
data/.travis.yml
CHANGED
data/README.markdown
CHANGED
@@ -101,6 +101,23 @@ Local Overrides (experimental)
|
|
101
101
|
==============================
|
102
102
|
Soloist is an easy way to share configuration across workstations. If you want to have configuration in chef that you don't want to share with the rest of the project, you can create a soloistrc_local file in addition to the soloistrc file. This file will be processed after the soloistrc, and everything in it will be added to the run list. Be careful that you are clear what goes where - if it's a dependency of the project, it should be checked into the soloistrc file in the project.
|
103
103
|
|
104
|
+
Setting Node Attributes
|
105
|
+
=======================
|
106
|
+
You can set node attributes in your soloistrc file that will be included in the JSON attributes file passed to chef-solo.
|
107
|
+
|
108
|
+
cookbook_paths:
|
109
|
+
- ./chef/cookbooks/
|
110
|
+
recipes:
|
111
|
+
- pivotal_workstation::github_ssh_keys
|
112
|
+
- pivotal_workstation::rvm
|
113
|
+
node_attributes:
|
114
|
+
github_username: john.smith
|
115
|
+
github_password: pas$w0rd
|
116
|
+
rvm:
|
117
|
+
rubies:
|
118
|
+
ruby-1.8.7-p299: {}
|
119
|
+
jruby-1.6.6: {}
|
120
|
+
|
104
121
|
License
|
105
122
|
=======
|
106
123
|
Soloist is MIT Licensed. See MIT-LICENSE for details.
|
@@ -9,6 +9,7 @@ module Soloist
|
|
9
9
|
@cookbook_paths = []
|
10
10
|
@cookbook_gems = []
|
11
11
|
@preserved_environment_variables = %w{PATH BUNDLE_PATH GEM_HOME GEM_PATH RAILS_ENV RACK_ENV}
|
12
|
+
@node_attributes = config['node_attributes'] || {}
|
12
13
|
merge_config(config, relative_path_to_soloistrc)
|
13
14
|
end
|
14
15
|
|
@@ -65,7 +66,7 @@ module Soloist
|
|
65
66
|
def json_hash
|
66
67
|
{
|
67
68
|
"recipes" => @recipes
|
68
|
-
}
|
69
|
+
}.merge(@node_attributes)
|
69
70
|
end
|
70
71
|
|
71
72
|
def json_file
|
data/lib/soloist/version.rb
CHANGED
@@ -106,6 +106,12 @@ env_variable_switches:
|
|
106
106
|
@generator = Soloist::ChefConfigGenerator.new(YAML.load(@config), "")
|
107
107
|
@generator.json_hash.should == { "recipes" => ["pivotal_workstation::ack"]}
|
108
108
|
end
|
109
|
+
|
110
|
+
it "should set node attributes" do
|
111
|
+
@config = "node_attributes:\n github_username: avh4"
|
112
|
+
@generator = Soloist::ChefConfigGenerator.new(YAML.load(@config), "")
|
113
|
+
@generator.json_hash.should == { "recipes" => [], "github_username" => "avh4" }
|
114
|
+
end
|
109
115
|
end
|
110
116
|
|
111
117
|
describe "environment variable merging" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soloist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 49
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 5
|
10
|
+
version: 0.9.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matthew Kocher
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-05-12 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: chef
|
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
87
|
requirements: []
|
88
88
|
|
89
89
|
rubyforge_project: soloist
|
90
|
-
rubygems_version: 1.8.
|
90
|
+
rubygems_version: 1.8.17
|
91
91
|
signing_key:
|
92
92
|
specification_version: 3
|
93
93
|
summary: Soloist is a simple way of running chef-solo
|