Add test to run dns local vm

Change-Id: Ic7d09c9a3c9c2382edb6ca0543711fef2385bfcb
diff --git a/tcp_tests/templates/local_dns/underlay--user-data1604.yaml b/tcp_tests/templates/local_dns/underlay--user-data1604.yaml
index 39ce86e..f60c4c2 100644
--- a/tcp_tests/templates/local_dns/underlay--user-data1604.yaml
+++ b/tcp_tests/templates/local_dns/underlay--user-data1604.yaml
@@ -49,6 +49,7 @@
    ############## Cloud repo01 node ##################
    - echo "nameserver 172.18.208.44" >> /etc/resolv.conf;
    - echo "nameserver 8.8.8.8" >> /etc/resolv.conf;
+   - export LOCAL_DNS_IP=$(ifconfig ens3 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1)
    - which wget >/dev/null || (apt-get update; apt-get install -y wget);
 
    - echo "deb [arch=amd64] http://apt.mirantis.com/xenial {{ REPOSITORY_SUITE }} salt extra" > /etc/apt/sources.list.d/mcp_salt.list;
@@ -73,6 +74,7 @@
    - cp /tmp/underpillar/states/*.sls /srv/salt/;
    - cp /srv/pillar/top_localdns.sls /srv/pillar/top.sls;
    - cp /srv/salt/top_localdns.sls /srv/salt/top.sls;
+   - find /srv/pillar/ -type f -exec sed -i "s/==LOCAL_DNS_IP==/${LOCAL_DNS_IP}/g" {} +
    - salt-call --local  --state-output=mixed state.sls dnsmasq;
    - salt-call --local  --state-output=mixed state.sls nginx;
    ########################################################