2017-09-05 12:01:27 +02:00
|
|
|
---
|
|
|
|
- name: install dhcp packages
|
2017-10-11 17:53:20 +02:00
|
|
|
package:
|
2017-12-28 22:10:09 +01:00
|
|
|
name: "{{ item }}"
|
2017-09-05 12:01:27 +02:00
|
|
|
state: present
|
2017-12-28 22:10:09 +01:00
|
|
|
with_items: "{{ kea_packages }}"
|
2017-09-05 12:01:27 +02:00
|
|
|
|
2017-12-28 22:10:09 +01:00
|
|
|
- name: configure kea dhcp server
|
2017-09-05 12:01:27 +02:00
|
|
|
template:
|
2017-12-28 22:10:09 +01:00
|
|
|
src: kea_dhcp4.conf.j2
|
|
|
|
dest: /etc/kea/kea-dhcp4.conf
|
|
|
|
notify: restart kea-dhcp4-server
|
|
|
|
|
|
|
|
- name: remove kea init file if present
|
|
|
|
file:
|
|
|
|
path: /etc/init.d/kea-dhcp4-server
|
|
|
|
state: absent
|
|
|
|
notify: reload systemd
|
2017-10-26 22:35:55 +02:00
|
|
|
|
2017-12-28 22:10:09 +01:00
|
|
|
- name: enable systemd unit kea
|
2017-10-26 22:35:55 +02:00
|
|
|
systemd:
|
2017-12-28 22:10:09 +01:00
|
|
|
name: kea-dhcp4-server
|
2017-10-26 22:35:55 +02:00
|
|
|
enabled: yes
|
|
|
|
state: started
|