summaryrefslogtreecommitdiff
path: root/lib/chef/provider/ifconfig.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-12-15 16:11:53 -0800
committerTim Smith <tsmith@chef.io>2017-12-18 18:10:08 -0800
commita0e844d3b7d47047ca14b8d306db071975000717 (patch)
tree73fe7c16bdd88bd89410197a5042497e513b0857 /lib/chef/provider/ifconfig.rb
parentf61f8bb75fcc0ba934b688c34f8d018bfcb3ca81 (diff)
downloadchef-a0e844d3b7d47047ca14b8d306db071975000717.tar.gz
Modernize the ifconfig resource
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/provider/ifconfig.rb')
-rw-r--r--lib/chef/provider/ifconfig.rb18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/chef/provider/ifconfig.rb b/lib/chef/provider/ifconfig.rb
index 5008d7877a..c8da5e255f 100644
--- a/lib/chef/provider/ifconfig.rb
+++ b/lib/chef/provider/ifconfig.rb
@@ -23,20 +23,14 @@ require "chef/resource/file"
require "chef/exceptions"
require "erb"
-# Recipe example:
-#
-# int = {Hash with your network settings...}
-#
-# ifconfig int['ip'] do
-# ignore_failure true
-# device int['dev']
-# mask int['mask']
-# gateway int['gateway']
-# mtu int['mtu']
-# end
-
class Chef
class Provider
+ # use the ifconfig resource to manage interfaces on *nix systems
+ #
+ # @example set a static ip on eth1
+ # ifconfig '33.33.33.80' do
+ # device 'eth1'
+ # end
class Ifconfig < Chef::Provider
provides :ifconfig