aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/dns/defaults/main.yml9
-rw-r--r--roles/dns/tasks/main.yml6
-rw-r--r--roles/dns/templates/resolv.conf.j24
3 files changed, 14 insertions, 5 deletions
diff --git a/roles/dns/defaults/main.yml b/roles/dns/defaults/main.yml
new file mode 100644
index 0000000..3928589
--- /dev/null
+++ b/roles/dns/defaults/main.yml
@@ -0,0 +1,9 @@
+
+# dns ~~ roles/dns/defaults/vars.yml
+# default dns
+
+---
+
+dns_dns:
+ - 8.8.8.8
+ - 1.1.1.1
diff --git a/roles/dns/tasks/main.yml b/roles/dns/tasks/main.yml
index 3e84009..1b18833 100644
--- a/roles/dns/tasks/main.yml
+++ b/roles/dns/tasks/main.yml
@@ -8,9 +8,9 @@
template:
src: resolv.conf.j2
dest: /etc/resolv.conf
- owner: "{{ user_root }}"
- group: "{{ group_root }}"
- mode: 0644
+ owner: "0"
+ group: "0"
+ mode: "0644"
- name: check dns resolution
shell: ping -c 1 google.com
diff --git a/roles/dns/templates/resolv.conf.j2 b/roles/dns/templates/resolv.conf.j2
index f7240e7..b789e8a 100644
--- a/roles/dns/templates/resolv.conf.j2
+++ b/roles/dns/templates/resolv.conf.j2
@@ -2,6 +2,6 @@
# resolv configuration ~~ /etc/resolv.conf
# managed by Ansible
-nameserver {{ global.dns[0] }}
-nameserver {{ global.dns[1] }}
+nameserver {{ dns_dns[0] }}
+nameserver {{ dns_dns[1] }}
remember that computers suck.