Work flow for automated nameserver setup

Is there a way to automate setting up the initial name servers on a webmin/virtualmin install?

I build 3 or 4 installs a week and have been setting them up manually.

Example:

hostname
vps.example.com

Main site on the vps is:
example.com

custom name servers:
ns1.example.com
ns2.example.com

Subsequent virtual servers would use ns1.example.com and ns2.example.com as their name servers.

What can I do so that the first vhost made gets name servers created automatically and these become the default custom name servers?

Anybody?

Anybody?

Hmnn… I was looking for the answer to this question as well.

I tried adding them to the server template but keep getting the following error:

Failed to save server template : Additional nameserver ns1.nameserver.com does not exist

Time for me to give back to the community!

The simple answer to the OP’s question is:

Go to Virtualmin -> System Settings -> Server Templates.

Click Default Settings.

From the dropdown list, select BIND DNS domain.

In the section for “Additional manually configured nameservers:” put in your custom nameservers, one per line.

The answer to my additional question on why it wouldn’t accept my nameservers was found here:

http://www.virtualmin.com/node/10069

I had to go to Webmin-> Networking -> Network Configuration, click on Host Addresses, then add the nameserver names to the IP addresses.

So, the existing entry showed server.example.com, server and to that I added ns1.example.com. ns1

Saved it, applied the configuration and went back to the Server Settings and added my custom nameservers and they went through.

HTH!