Skip to content

Commit 76e690f

Browse files
authored
Merge pull request #25 from ncerny/nc/wf-log-bug
Fix build node log location.
2 parents 4560c48 + 710fdbb commit 76e690f

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

libraries/helpers.rb

+8-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ def prefix
2222

2323
def ensurekv(config, hash)
2424
hash.each do |k, v|
25+
if v.is_a?(Symbol)
26+
v = v.to_s
27+
str = v
28+
else
29+
str = "'#{v}'"
30+
end
2531
if config =~ /^ *#{v}.*$/
26-
config.sub(/^ *#{v}.*$/, "#{k} '#{v}'")
32+
config.sub(/^ *#{v}.*$/, "#{k} #{str}")
2733
else
28-
config << "\n#{k} '#{v}'"
34+
config << "\n#{k} #{str}"
2935
end
3036
end
3137
config

metadata.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
long_description 'Resource Cookbook for Managing Chef Software Inc Product Suite'
88
issues_url 'https://github.com/ncerny/chef_stack/issues' if respond_to?(:issues_url)
99
source_url 'https://github.com/ncerny/chef_stack' if respond_to?(:source_url)
10-
version '0.6.3'
10+
version '0.8.0'
1111

1212
depends 'chef-ingredient'

resources/wf_builder.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
file "#{workspace}/#{dir}" do
119119
content ensurekv(::File.read(new_resource.chef_config_path),
120120
node_name: new_resource.chef_user,
121-
log_location: 'STDOUT',
121+
log_location: :STDOUT,
122122
client_key: "#{workspace}/#{dir}/#{new_resource.chef_user}.pem",
123123
trusted_certs_dir: '/etc/chef/trusted_certs')
124124
mode '0644'

0 commit comments

Comments
 (0)