[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [atomic-devel] Setting a DNS entry




On Mar 14, 2016 6:19 PM, "Charlie Drage" <cdrage redhat com> wrote:
>
> My meta-data I use this:
>
> instance-id: Atomic02
> local-hostname: atomic-host-002
> network-interfaces: |
>   iface eth0 inet static
>   address 198.52.161.43
>   netmask 255.255.255.0
>   gateway 198.52.161.1
>
> Is there a way to set dns as well? Seems that adding "dns 8.8.8.8" to
> the end does not work.
>
> I'm forced to use in cloud-config
>
> #cloud-config
> bootcmd:
>  - echo 8.8.8.8  > /etc/resolv.conf
>
> Unfortunatley after a reboot resolv.conf is removed due to network
> manager autogenerating the resolv.conf file.
>
> Is there any way to specify it in the network-interfaces of the
> meta-data?

Have you tried this: http://cloudinit.readthedocs.org/en/latest/topics/examples.html#configure-an-instances-resolv-conf

--
Jason DeTiberus


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]