Commit 76bef33f authored by nanahira's avatar nanahira

add backup dnses

parent 61a9b346
......@@ -11,16 +11,6 @@
max-size: '1g'
# registry-mirrors
tasks:
- name: set resolv.conf
become: true
copy:
content: |
nameserver 127.0.0.1
{% for dns in smartdns.china_dns %}
nameserver {{dns}}
{% endfor %}
dest: /etc/resolv.conf
- name: read docker daemon
become: true
shell: 'cat /etc/docker/daemon.json'
......
......@@ -3,6 +3,11 @@
copy:
content: |
nameserver 127.0.0.1
{% for br in bridges %}
{% if not (br.masq is defined and br.masq) and br.address is defined and br.address %}
nameserver {{ br.address | regex_replace("/\d+$", "") }}
{% endif %}
{% endfor %}
{% for dns in smartdns.china_dns %}
nameserver {{dns}}
{% endfor %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment