main.yml 432 B

123456789101112131415
  1. ---
  2. - name: Ensure ISC DHCPD is installed
  3. apt: name=isc-dhcp-server
  4. - name: Bind dhcpd to bat0
  5. lineinfile: dest=/etc/default/isc-dhcp-server regexp="^INTERFACES" line='INTERFACES="bat0"'
  6. notify: "Restart dhcpd"
  7. - name: Install dhcpd.conf
  8. template: src=dhcpd.conf.j2 dest=/etc/dhcp/dhcpd.conf
  9. notify: "Restart dhcpd"
  10. - name: Ensure dhcpd is started and enabled
  11. service: name=isc-dhcp-server state=started enabled=yes