Commit 87dad3af authored by Joanne Hugé's avatar Joanne Hugé

playbook/ors: add default nameservers

parent 30ccd969
Pipeline #28531 failed with stage
in 0 seconds
...@@ -139,9 +139,13 @@ ...@@ -139,9 +139,13 @@
force: true force: true
register: create_resolv_link register: create_resolv_link
- name: Configure default nameservers
lineinfile: dest=/etc/systemd/resolved.conf regexp="^DNS=(.*)" line="DNS=1.1.1.1 8.8.8.8" state=present
register: configure_default_nameservers
- name: Restart systemd-resolved.service if necessary - name: Restart systemd-resolved.service if necessary
systemd: name=systemd-resolved.service enabled=yes state=restarted systemd: name=systemd-resolved.service enabled=yes state=restarted
when: (disable_dns_stub.changed) or (create_resolv_link.changed) when: (disable_dns_stub.changed) or (create_resolv_link.changed) or (configure_default_nameservers.changed)
- name: Enable and start systemd-resolved.service - name: Enable and start systemd-resolved.service
systemd: name=systemd-resolved.service enabled=yes state=started systemd: name=systemd-resolved.service enabled=yes state=started
......
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