puppet-network
puppet-network copied to clipboard
Option to set DNS?
Thanks for working this! I've read through the docs a couple times and I can't seem to actually find a way to set DNS servers. Am I just being dense?
I've not tested it, but looking through the code, you might be able to use the options
parameter?
network_config { 'eth0':
...
options => {'DNS1' => '4.2.2.2'},
}
@alexjfisher thanks! will give it a try later today.
This won't work for a network bond because the options variable is passed to the BONDING_OPTS parameter.
i resolved this issue with, for example
$intf = 'eth0'
$ns = ['127.0.0.1' '1.1.1.1']
network_config { $intf:
options => {'dns-nameservers' => $ns.join('')},
}