Clean up, specify eth0 as dhcp interface.

This commit is contained in:
Markus 2017-07-07 07:48:21 +02:00
parent fd6abd2dd2
commit 88c23c3693
2 changed files with 21 additions and 8 deletions

View File

@ -1,18 +1,14 @@
--- ---
- name: Install dhcp server - name: Install dhcp server
apt: name={{item}} state=latest apt: name=isc-dhcp-server
tags: dhcp
with_items:
- isc-dhcp-server
- name: Configure dhcp server - name: Configure dhcp server
template: src={{ item }}.j2 dest=/etc/{{ item }} template: src={{ item }}.j2 dest=/etc/{{ item }}
tags: dhcp
notify: Restart isc-dhcp-server
with_items: with_items:
- default/isc-dhcp-server
- dhcp/dhcpd.conf - dhcp/dhcpd.conf
notify: Restart isc-dhcp-server
- name: Start the dhcp server - name: Start the dhcp server
service: name=isc-dhcp-server state=started enabled=yes service: name=isc-dhcp-server state=started enabled=yes
tags: dhcp

View 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"