Support custom static nameserver during build

We statically set 8.8.8.8 for a dns resolver in prepare-node. Allow
setting a custom nameserver.

Change-Id: I888c4bcefdf36ad7064d66b6a1e75d996b93b375
This commit is contained in:
Gregory Haynes 2015-02-19 14:11:49 -08:00
parent fe0a6b43d1
commit f504d47200
3 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1 @@
export NODEPOOL_STATIC_NAMESERVER=${NODEPOOL_STATIC_NAMESERVER:-8.8.8.8}

View File

@ -17,11 +17,12 @@
set -e set -e
NODEPOOL_STATIC_NAMESERVER=${NODEPOOL_STATIC_NAMESERVER:-8.8.8.8}
# The puppet modules should install unbound. # The puppet modules should install unbound.
dd of=/tmp/forwarding.conf <<EOF dd of=/tmp/forwarding.conf <<EOF
forward-zone: forward-zone:
name: "." name: "."
forward-addr: 8.8.8.8 forward-addr: $NODEPOOL_STATIC_NAMESERVER
EOF EOF
mv /tmp/forwarding.conf /etc/unbound/ mv /tmp/forwarding.conf /etc/unbound/

View File

@ -48,4 +48,4 @@ fi
set -e set -e
# Make sure resolv.conf settings don't break dib # Make sure resolv.conf settings don't break dib
echo 'nameserver 8.8.8.8'> /etc/resolv.conf echo "nameserver $NODEPOOL_STATIC_NAMESERVER"> /etc/resolv.conf