Hello,

I've written a simple little framework to write pipebackend based dynamic 
records using Ruby.

A sample:

module Pdns
  newrecord("www.your.net") do |query, answer|
    case country(query[:remoteip])
      when "US", "CA"
        answer.content "64.xx.xx.245"

      when "ZA", "ZW"
        answer.content "196.xx.xx.10"

      else
        answer.content "78.xx.xx.140"
      end
  end
end

You would simply drop this into a file in a directory and it would get served, 
this is all you need to worry about, if you want to upgrade your record with 
new logic, just replace the file, no more.

Of course pdns has its own geo module but this is a good sample of a potential 
use case, the idea is to allow you do anything you can conceive using the Ruby 
language.

Please visit http://code.google.com/p/ruby-pdns/ for more information, 
downloads and use case samples.

Thanks, all feedback appreciated!

-- 
R.I.Pienaar
_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to