I also use puppet for my nodes. I am also running a (BIND) dns server.
Would it be possible to use the $aliases
variable I have for each node in a template for the DNS module?
My nodes look like this:
$ cat nodes/kayak.local.pp
node 'kayak.local' {
include base
$node_aliases = ['svn','puppet']
$node_primaryip = '10.0.64.200'
network::interface { 'eth0':
ip => $node_primaryip,
gw => '10.0.64.1',
mac => '00:50:00:00:00:3f',
netmask => '255.255.255.0',
}
}
What I am looking for is being able to make a template like this:
$cat local.erb
<% scope.lookupvar('ALLNODES::aliases').each do |alias| -%>
<%= alias %> IN A <%= node_primaryip %>
<% end -%>
who can help me?