ansible-ffibk/roles/service-dhcpd/tasks/main.yml
2017-12-28 22:12:00 +01:00

24 lines
503 B
YAML

---
- name: install dhcp packages
package:
name: "{{ item }}"
state: present
with_items: "{{ kea_packages }}"
- name: configure kea dhcp server
template:
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
- name: enable systemd unit kea
systemd:
name: kea-dhcp4-server
enabled: yes
state: started