Created
June 26, 2013 15:52
-
-
Save chrisroberts/5868624 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.9.3-p327 :004 > resource = Chef::Util::AttributeStruct.new | |
=> #<Chef::Util::AttributeStruct> | |
1.9.3-p327 :005 > resource.interfaces('eth0') do | |
1.9.3-p327 :006 > ipaddress '192.168.0.1' | |
1.9.3-p327 :007?> gateway '192.168.0.1' | |
1.9.3-p327 :008?> netmask '255.255.255.0' | |
1.9.3-p327 :009?> enabled true | |
1.9.3-p327 :010?> end | |
=> #<Chef::Util::AttributeStruct eth0=#<Chef::Util::AttributeStruct ipaddress="192.168.0.1", gateway="192.168.0.1", netmask="255.255.255.0", enabled=true>> | |
1.9.3-p327 :011 > resource.name 'pow' | |
=> "pow" | |
1.9.3-p327 :012 > resource._dump | |
=> {:interfaces=>{:eth0=>{:ipaddress=>"192.168.0.1", :gateway=>"192.168.0.1", :netmask=>"255.255.255.0", :enabled=>true}}, :name=>"pow"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment