dhcpd: Install and configure ISC DHCPD

This commit is contained in:
2018-03-12 20:27:28 -05:00
parent 9e73b56ac7
commit 4811a726a1
8 changed files with 182 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
- name: ensure dhcpd is installed
package:
name=dhcp-server
state=present
tags:
- install
- name: ensure dhcpd service is configured
template:
src=dhcpd.confd.j2
dest=/etc/conf.d/dhcpd
mode=0644
when: ansible_distribution == 'Gentoo'
notify: restart dhcpd
- name: ensure dhcpd is configured
template:
src=dhcpd.conf.j2
dest=/etc/dhcp/dhcpd.conf
mode=0644
notify: restart dhcpd
- name: ensure dhcpd starts at boot
service:
name=dhcpd
enabled=yes
- meta: flush_handlers
- name: ensure dhcpd is running
service:
name=dhcpd
state=started