X-Git-Url: https://git.ralfj.de/ansible.git/blobdiff_plain/a85ed6da38d67a4817a98bcfbe6be1f951284d0b..97f7dca1f0656892c5d373ce86d0fa2aaef98ddf:/roles/postfix/tasks/unbound.yml?ds=inline diff --git a/roles/postfix/tasks/unbound.yml b/roles/postfix/tasks/unbound.yml index 2a91a80..34fbe81 100644 --- a/roles/postfix/tasks/unbound.yml +++ b/roles/postfix/tasks/unbound.yml @@ -11,6 +11,15 @@ # not a handler to make sure it succeeds before we go touch system DNS when: unbound_config.changed service: name=unbound state=restarted enabled=yes +# use as system DNS +- name: detect DHCP client + stat: path=/etc/dhcp/dhclient.conf + register: dhclient +- name: configure DHCP + when: dhclient.stat.exists == True + copy: + dest: /etc/dhcp/dhclient.conf + src: files/unbound/dhclient.conf - name: configure system DNS copy: dest: /etc/resolv.conf