Skip to content

Instantly share code, notes, and snippets.

@jssjr
Created January 15, 2014 17:54
Show Gist options
  • Save jssjr/8441007 to your computer and use it in GitHub Desktop.
Save jssjr/8441007 to your computer and use it in GitHub Desktop.
search(:node).map { |n| {fqdn: n['fqdn'], ip: n['ipaddress']} }.each do |i|
Chef::Log.info "Creating: host #{i[:fqdn]}"
djbdns_rr "host #{i[:fqdn]}" do
fqdn i[:fqdn]
cwd "#{node[:djbdns][:tinydns_dir]}/root"
ip i[:ip]
type "host"
action :add
notifies :run, "execute[build-tinydns-data]"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment