File tree 3 files changed +10
-4
lines changed
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,16 @@ def prefix
22
22
23
23
def ensurekv ( config , hash )
24
24
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
25
31
if config =~ /^ *#{ v } .*$/
26
- config . sub ( /^ *#{ v } .*$/ , "#{ k } ' #{ v } ' " )
32
+ config . sub ( /^ *#{ v } .*$/ , "#{ k } #{ str } " )
27
33
else
28
- config << "\n #{ k } ' #{ v } ' "
34
+ config << "\n #{ k } #{ str } "
29
35
end
30
36
end
31
37
config
Original file line number Diff line number Diff line change 7
7
long_description 'Resource Cookbook for Managing Chef Software Inc Product Suite'
8
8
issues_url 'https://github.com/ncerny/chef_stack/issues' if respond_to? ( :issues_url )
9
9
source_url 'https://github.com/ncerny/chef_stack' if respond_to? ( :source_url )
10
- version '0.6.3 '
10
+ version '0.8.0 '
11
11
12
12
depends 'chef-ingredient'
Original file line number Diff line number Diff line change 118
118
file "#{ workspace } /#{ dir } " do
119
119
content ensurekv ( ::File . read ( new_resource . chef_config_path ) ,
120
120
node_name : new_resource . chef_user ,
121
- log_location : ' STDOUT' ,
121
+ log_location : : STDOUT,
122
122
client_key : "#{ workspace } /#{ dir } /#{ new_resource . chef_user } .pem" ,
123
123
trusted_certs_dir : '/etc/chef/trusted_certs' )
124
124
mode '0644'
You can’t perform that action at this time.
0 commit comments