blob: 8c103de1d96c08b2c2166a9baf5b268b94d529a6 [file] [log] [blame]
Zack Williamsba5549c2017-03-25 15:04:45 -07001---
2# dhcpd/tasks/main.yml
3
4- name: Install dhcpd
5 apt:
6 name: "{{ item }}"
7 update_cache: yes
8 cache_valid_time: 3600
9 with_items:
10 - isc-dhcp-server
11
12- name: Create /etc/dhcp/dhcpd.conf from template
13 template:
14 src: dhcpd.conf.j2
15 dest: /etc/dhcp/dhcpd.conf
16 mode: "0644"
17 owner: root
18 group: root
19 # validate: 'dhcpd -t -cf %s'
20 notify:
21 - restart-dhcpd
22
23- name: Set interfaces for dhcpd to listen on
24 template:
25 src: isc-dhcp-server.j2
26 dest: /etc/default/isc-dhcp-server
27 mode: "0644"
28 owner: root
29 group: root
30 notify:
31 - restart-dhcpd
32