|
@@ -23,18 +23,17 @@ end
|
|
|
|
|
|
include_recipe 'git'
|
|
|
|
|
|
- node['workstation']['_git'].each do |scope_git, git_options|
|
|
|
- if scope_git.match(/^file_/)
|
|
|
- gitconfig_file = $' # String after the match (ref: https://ruby-doc.org/core-2.5.1/Regexp.html#class-Regexp-label-Special+global+variables)
|
|
|
- scope_git = 'file'
|
|
|
- end
|
|
|
- git_options.each do |k, v|
|
|
|
- git_config k do
|
|
|
- value v.to_s
|
|
|
- scope scope_git
|
|
|
- user username if %w{global file}.include?(scope_git)
|
|
|
- config_file gitconfig_file if scope_git == 'file'
|
|
|
- end
|
|
|
+node['workstation']['_git'].each do |scope_git, git_options|
|
|
|
+ if scope_git.match(/^file_/)
|
|
|
+ gitconfig_file = $' # String after the match (ref: https://ruby-doc.org/core-2.5.1/Regexp.html#class-Regexp-label-Special+global+variables)
|
|
|
+ scope_git = 'file'
|
|
|
+ end
|
|
|
+ git_options.each do |k, v|
|
|
|
+ git_config k do
|
|
|
+ value v.to_s
|
|
|
+ scope scope_git
|
|
|
+ user username if %w{global file}.include?(scope_git)
|
|
|
+ config_file gitconfig_file if scope_git == 'file'
|
|
|
end
|
|
|
end
|
|
|
end
|