forked from infra/ansible
Clean up, specify eth0 as dhcp interface.
This commit is contained in:
parent
fd6abd2dd2
commit
88c23c3693
@ -1,18 +1,14 @@
|
||||
---
|
||||
|
||||
- name: Install dhcp server
|
||||
apt: name={{item}} state=latest
|
||||
tags: dhcp
|
||||
with_items:
|
||||
- isc-dhcp-server
|
||||
apt: name=isc-dhcp-server
|
||||
|
||||
- name: Configure dhcp server
|
||||
template: src={{item}}.j2 dest=/etc/{{item}}
|
||||
tags: dhcp
|
||||
notify: Restart isc-dhcp-server
|
||||
template: src={{ item }}.j2 dest=/etc/{{ item }}
|
||||
with_items:
|
||||
- default/isc-dhcp-server
|
||||
- dhcp/dhcpd.conf
|
||||
notify: Restart isc-dhcp-server
|
||||
|
||||
- name: Start the dhcp server
|
||||
service: name=isc-dhcp-server state=started enabled=yes
|
||||
tags: dhcp
|
||||
|
17
roles/dhcpd/templates/default/isc-dhcp-server
Normal file
17
roles/dhcpd/templates/default/isc-dhcp-server
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# This is a POSIX shell fragment
|
||||
#
|
||||
|
||||
# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
|
||||
#DHCPD_CONF=/etc/dhcp/dhcpd.conf
|
||||
|
||||
# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
|
||||
#DHCPD_PID=/var/run/dhcpd.pid
|
||||
|
||||
# Additional options to start dhcpd with.
|
||||
# Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
|
||||
#OPTIONS=""
|
||||
|
||||
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
|
||||
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
|
||||
INTERFACES="eth0"
|
Loading…
Reference in New Issue
Block a user