summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-10-19 11:04:25 -0700
committerTim Smith <tsmith84@gmail.com>2020-10-19 11:04:25 -0700
commit1477502ab1e12b8f6589473fde795651fa50ad6a (patch)
tree4c5f56059a62037c24e52a8d38a5b14f2f81b781
parent605ed8a26628a1d767929d0ed94375dca01d41ec (diff)
downloadchef-1477502ab1e12b8f6589473fde795651fa50ad6a.tar.gz
Add bridge property to ifconfig for RHEL based systems
I don't see any documentation mentioning this being used on Debian, but it's a thing in the legacy interface configs on RHEL Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/provider/ifconfig/redhat.rb4
-rw-r--r--lib/chef/resource/ifconfig.rb4
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/chef/provider/ifconfig/redhat.rb b/lib/chef/provider/ifconfig/redhat.rb
index 2fbb9ff958..a7f73c43dc 100644
--- a/lib/chef/provider/ifconfig/redhat.rb
+++ b/lib/chef/provider/ifconfig/redhat.rb
@@ -78,10 +78,12 @@ VLAN=<%= new_resource.vlan %>
<% if new_resource.gateway -%>
GATEWAY=<%= new_resource.gateway %>
<% end -%>
+<% if new_resource.bridge -%>
+BRIDGE=<%= new_resource.bridge %>
+<% end -%>
}
@config_path = "/etc/sysconfig/network-scripts/ifcfg-#{new_resource.device}"
end
-
end
end
end
diff --git a/lib/chef/resource/ifconfig.rb b/lib/chef/resource/ifconfig.rb
index ed62ab5952..091b95a579 100644
--- a/lib/chef/resource/ifconfig.rb
+++ b/lib/chef/resource/ifconfig.rb
@@ -102,6 +102,10 @@ class Chef
property :gateway, String,
introduced: "14.4",
description: "The gateway to use for the interface."
+
+ property :bridge, String,
+ introduced: "16.7",
+ description: "The bridge interface this interface is a member of on Red Hat based systems."
end
end
end