1
0
forked from infra/ansible
infra/roles/dhcp/tasks/main.yml

19 lines
377 B
YAML
Raw Normal View History

2017-01-21 17:55:08 +01:00
---
- name: Install dhcp server
apt: name={{item}} state=latest
tags: dhcp
with_items:
- isc-dhcp-server
- name: Configure dhcp server
template: src={{item}}.j2 dest=/etc/{{item}}
tags: dhcp
notify: Restart isc-dhcp-server
with_items:
- dhcp/dhcpd.conf
- name: Start the dhcp server
service: name=isc-dhcp-server state=started enabled=yes
tags: dhcp