Skip to content

Commit

Permalink
smartos: use Google DNS servers
Browse files Browse the repository at this point in the history
DNS tests are sensible to which DNS servers are used. Google DNS servers
are known to work and should provide a stable DNS environment to run the
tests.

Fixes: nodejs/node-v0.x-archive#25858
  • Loading branch information
joaocgreis committed Aug 17, 2015
1 parent 24f0c48 commit 820df96
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions setup/smartos/ansible-playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
with_items: packages
tags: general

- name: Remove all DNS servers from resolv.conf
lineinfile: dest=/etc/resolv.conf state=absent regexp="^(\s*)nameserver(\s+)"
tags: general

- name: Add DNS servers to the list in resolv.conf
lineinfile: dest=/etc/resolv.conf state=present regexp="^(\s*)nameserver(\s+){{ item }}(\s*)$" line="nameserver {{ item }}"
with_items: dns_servers
tags: general

- name: User | Add {{ server_user }} group
command: groupadd {{ server_user }}
tags: user
Expand Down
3 changes: 3 additions & 0 deletions setup/smartos/ansible-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ packages:
- automake
- libtool
- ccache
dns_servers:
- 8.8.8.8
- 8.8.4.4

0 comments on commit 820df96

Please sign in to comment.