Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
require 'yaml' node = YAML.load_file("/cs/etc/node_metadata.yml") Facter.add('cs_nat_ip') do setcode do node[:nat_ip_addr] end end ## in irb get this: => #<Facter:0x2ab5213ca428 @ldapname="cs_nat_ip", @tags=[], @searching=false, @name="cs_nat_ip", @resolves=[#<Facter::Resolution:0x2ab5213ca090 @fact=#<Facter:0x2ab5213ca428 ...>, @suitable=true, @name="cs_nat_ip", @confines=[], @code=#<Proc:0x00002ab5213cb008@(irb#1):12>, @value=nil>], @value=nil>
This paste will be private.
From the Design Piracy series on my blog: