trixie/roles/dhcp-dns-dnsmasq/tasks/main.yml

18 lines
449 B
YAML
Raw Normal View History

2018-06-04 18:00:25 +03:00
- name: install dnsmasq package
2018-05-31 18:20:51 +03:00
apt:
name: dnsmasq
state: latest
- name: add client hostnames and IP addresses to /etc/hosts
lineinfile:
dest: /etc/hosts
line: "{{ item.1 }}\t{{ 'debian%03d' | format(item.0) }}"
with_indexed_items: "{{ dhcp_list }}"
notify: "restart dnsmasq"
2018-05-31 18:20:51 +03:00
- name: configure dnsmasq
template:
src: dnsmasq-transparent-proxy.j2
dest: /etc/dnsmasq.d/transparent-proxy
notify: "restart dnsmasq"