Skip to content

Commit

Permalink
Merge pull request #96 from MrMMorris/dnsmasq
Browse files Browse the repository at this point in the history
add docker0 to permitted dnsmasq interfaces
  • Loading branch information
mattfinlayson committed Jan 14, 2016
2 parents 8c7711f + f5519ff commit 390d34b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tasks/dnsmasq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,30 @@
- name: add local dns lookup
lineinfile: line="nameserver 127.0.0.1" insertbefore=BOF state=present dest="/etc/resolvconf/resolv.conf.d/consul" create=yes

- name: configure dnsmasq to listen on loopback interface only
- name: configure dnsmasq to listen on loopback interface
lineinfile:
dest: /etc/dnsmasq.conf
regexp: "^#interface="
line: "interface=lo"

- name: configure dnsmasq to listen on docker0 interface
lineinfile:
dest: /etc/dnsmasq.conf
insertafter: "^interface=lo"
line: "interface=docker0"

- name: configure dnsmasq to disable DHCP and TFTP
lineinfile:
dest: /etc/dnsmasq.conf
regexp: "^#no-dhcp-interface="
line: "no-dhcp-interface=lo"

- name: configure dnsmasq to disable DHCP and TFTP
lineinfile:
dest: /etc/dnsmasq.conf
insertafter: "^no-dhcp-interface=lo"
line: "no-dhcp-interface=docker0"

- name: configure dnsmasq to delegate all Consul DNS requests to the Consul DNS port
copy: >
content='server=/{{ consul_domain }}/{{ consul_client_address }}#{{ consul_port_dns }}'
Expand Down

0 comments on commit 390d34b

Please sign in to comment.