cloud-init and resolv.conf

Rufus Ebonhawk

Well-Known Member
Aug 7, 2017
45
3
48
55
Hi, we have a Centos7 template with cloud-init integration. cloud-init is awful ;) but it does what it should do. We face just one problem which we could not solve till now. It is the automatic configuration of nameserver in resolv.conf.

Our cloud-init template has a nameserver in resolv.conf. cloud-init *add* the nameserver from the target config file. As a result the already existing nameserver from the template is the first entry. It is a nameserver which is only available in our LAN. Connectivity is then a bit sub optimal... After cloning we have to manually remove the entry from resolv.conf.

Does anyone have an idea how to fix this situation? What do we miss?