Skip to content

Commit

Permalink
Merge pull request #25 from ncerny/nc/wf-log-bug
Browse files Browse the repository at this point in the history
Fix build node log location.
  • Loading branch information
ncerny authored Apr 14, 2017
2 parents 4560c48 + 710fdbb commit 76e690f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ def prefix

def ensurekv(config, hash)
hash.each do |k, v|
if v.is_a?(Symbol)
v = v.to_s
str = v
else
str = "'#{v}'"
end
if config =~ /^ *#{v}.*$/
config.sub(/^ *#{v}.*$/, "#{k} '#{v}'")
config.sub(/^ *#{v}.*$/, "#{k} #{str}")
else
config << "\n#{k} '#{v}'"
config << "\n#{k} #{str}"
end
end
config
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
long_description 'Resource Cookbook for Managing Chef Software Inc Product Suite'
issues_url 'https://github.com/ncerny/chef_stack/issues' if respond_to?(:issues_url)
source_url 'https://github.com/ncerny/chef_stack' if respond_to?(:source_url)
version '0.6.3'
version '0.8.0'

depends 'chef-ingredient'
2 changes: 1 addition & 1 deletion resources/wf_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
file "#{workspace}/#{dir}" do
content ensurekv(::File.read(new_resource.chef_config_path),
node_name: new_resource.chef_user,
log_location: 'STDOUT',
log_location: :STDOUT,
client_key: "#{workspace}/#{dir}/#{new_resource.chef_user}.pem",
trusted_certs_dir: '/etc/chef/trusted_certs')
mode '0644'
Expand Down

0 comments on commit 76e690f

Please sign in to comment.