Skip to content

Instantly share code, notes, and snippets.

@miah
Created October 4, 2012 19:05
Show Gist options
  • Select an option

  • Save miah/3835725 to your computer and use it in GitHub Desktop.

Select an option

Save miah/3835725 to your computer and use it in GitHub Desktop.
chef > node.default.djbdns.public_dnscache_allowed_networks = node.ipaddress.split('.')[0,2].join('.')
=> "192.168"
chef > default[:djbdns][:public_dnscache_allowed_networks] = [ipaddress.split(".")[0,2].join(".")]
NameError: undefined local variable or method `default' for main:Object
from (irb):4
from /Users/miahjohnson/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/chef-10.14.2/lib/chef/shef.rb:73:in `block in start'
from /Users/miahjohnson/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/chef-10.14.2/lib/chef/shef.rb:72:in `catch'
from /Users/miahjohnson/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/chef-10.14.2/lib/chef/shef.rb:72:in `start'
from /Users/miahjohnson/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/chef-10.14.2/bin/shef:34:in `<top (required)>'
from /Users/miahjohnson/.rbenv/versions/1.9.3-p125/bin/shef:23:in `load'
from /Users/miahjohnson/.rbenv/versions/1.9.3-p125/bin/shef:23:in `<main>'
chef >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment