Closed brianjmurrell closed 7 years ago
I'm not sure what are you talking about? May be you want to use plain ruby to work with your data structure:
my_hash = { 'host1' => 'host2', 'host3' => 'host4' }
...
my_hash.each_pair do |h, v|
nsupdate h do
value v
type :cname
ttl 86400
action :update
end
end
Oh, duh! Of course. Even though I have done similar a zillion times, it must have just been too late for me last night when I was looking at this.
Thanks!
Hi,
I understand how I could create a recipe that listed all of the DNS records I wanted to update using:
type stanzas, but if I instead, had my list of names and values in a different data structure, say a list of some wort, can I use this LWRP in any way to produce updates or am I going to be writing my own code around nsupdate to process that list and do the updates?