forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use DNS j2 for default DNS configuration (sonic-net#15901)
Why I did it Support default DNS configuration How I did it Use j2 template to generate default DNS configuration. How to verify it Run sonic-config-engine unit test.
- Loading branch information
Showing
5 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{# Please follow below example to add your DNS server | ||
{ | ||
"DNS_NAMESERVER": { | ||
"6.6.6.6": {}, | ||
"2001:4860:4860::64": {} | ||
} | ||
} | ||
#} | ||
{ | ||
"DNS_NAMESERVER": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"DNS_NAMESERVER": { | ||
{% if DEVICE_METADATA.localhost.cloudtype == "Public" %} | ||
"6.6.6.6": {} | ||
{% else %} | ||
"8.8.8.8": {} | ||
{% endif %} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters