ansible/roles/dhcpd/tasks/main.yml

19 lines
481 B
YAML
Raw Normal View History

2017-03-27 17:42:48 +02:00
---
- name: Install dhcp server
apt: name=isc-dhcp-server state=latest
- name: Configure dhcp server
template: src=dhcpd.conf.j2 dest=/etc/dhcp/dhcpd.conf
notify: Restart isc-dhcp-server
2017-04-03 22:35:54 +02:00
- name: Specify dhcp interfaces
lineinfile:
dest: /etc/default/isc-dhcp-server
line: "INTERFACES=\"{{ dhcpd_interfaces }}\""
regexp: "^INTERFACES="
notify: Restart isc-dhcp-server
2017-03-27 17:42:48 +02:00
- name: Start the dhcp server
service: name=isc-dhcp-server state=started enabled=yes