chef-solo-wrapper 0.0.14 → 0.0.15
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.
- data/bin/cs +2 -1
- data/lib/config_helper.rb +7 -1
- metadata +3 -3
data/bin/cs
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
# See the License for the specific language governing permissions and
|
17
17
|
# limitations under the License.
|
18
18
|
|
19
|
-
CHEF_SOLO_WRAPPER_VERSION = '0.0.
|
19
|
+
CHEF_SOLO_WRAPPER_VERSION = '0.0.15'
|
20
20
|
COOKBOOKS_SRC_DEST = '/usr/src/chef-cookbooks'
|
21
21
|
|
22
22
|
require 'rubygems'
|
@@ -185,6 +185,7 @@ if opts[:fetch]
|
|
185
185
|
require File.join(File.dirname(__FILE__), '../lib/cookbooks_fetcher.rb')
|
186
186
|
fetcher = CookbooksFetcher.new(log_level)
|
187
187
|
fetcher.fetch opts[:fetch]
|
188
|
+
exit
|
188
189
|
end
|
189
190
|
|
190
191
|
config.pre_checks
|
data/lib/config_helper.rb
CHANGED
@@ -132,12 +132,18 @@ class ConfigHelper < ChefSoloWrapper
|
|
132
132
|
if auto
|
133
133
|
create_empty = 'y'
|
134
134
|
else
|
135
|
-
puts 'Create empty node.json [y/n] <enter> ?'
|
135
|
+
puts 'Create empty node.json or edit existing [y/n/e] <enter> ?'
|
136
136
|
create_empty = 'n'
|
137
137
|
create_empty = gets.chomp
|
138
138
|
end
|
139
139
|
if create_empty.downcase == 'y'
|
140
140
|
json = '{}'
|
141
|
+
elsif create_empty == 'e'
|
142
|
+
editor = `which nano`.strip # fallback
|
143
|
+
editor = ENV['EDITOR'] if ENV['EDITOR']
|
144
|
+
puts " DEBUG: Using #{editor}"
|
145
|
+
system("#{editor} /etc/chef/node.json")
|
146
|
+
return
|
141
147
|
else
|
142
148
|
puts "Type or paste your node.json (type EOF then press <enter> to finish):"
|
143
149
|
$/ = "EOF"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-solo-wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 15
|
10
|
+
version: 0.0.15
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Fordham
|