summaryrefslogtreecommitdiff
path: root/lib/chef/provider/ifconfig.rb
diff options
context:
space:
mode:
authorJake Herbst <jherbst@rsglab.com>2020-10-06 14:49:00 -0400
committerJake Herbst <jherbst@rsglab.com>2020-10-06 14:49:00 -0400
commit6b84fab8c806e89126f682142b50d75d9f2e7cdd (patch)
tree255325e1e72041518249280a44162ee76913558d /lib/chef/provider/ifconfig.rb
parent6b077d998a0c3168cb7edb19d9d70d122ecafc95 (diff)
downloadchef-6b84fab8c806e89126f682142b50d75d9f2e7cdd.tar.gz
Changing ifconfig provider to use '-' trim_mode for its ERB templates and updating the redhat and debian ifconfigs to leverage the trim_mode so they are not constructed with any blank lines when nil values are encountered.
This addresses https://github.com/chef/chef/issues/10457 Signed-off-by: Jake Herbst <jmherbst@gmail.com>
Diffstat (limited to 'lib/chef/provider/ifconfig.rb')
-rw-r--r--lib/chef/provider/ifconfig.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/ifconfig.rb b/lib/chef/provider/ifconfig.rb
index d5e18ae730..07c7a7ed56 100644
--- a/lib/chef/provider/ifconfig.rb
+++ b/lib/chef/provider/ifconfig.rb
@@ -236,7 +236,7 @@ class Chef
return unless can_generate_config?
b = binding
- template = ::ERB.new(@config_template)
+ template = ::ERB.new(@config_template, nil, '-')
config = resource_for_config(@config_path)
config.content(template.result(b))
config.run_action(:create)