main.yml 579 B

12345678910111213141516171819202122
  1. ---
  2. - name: Ramdisk in fstab eintragen
  3. mount: name=/var/lib/dhcp src=tmpfs fstype=tmpfs opts='defaults,size=100M' state=mounted
  4. notify:
  5. - restart isc-dhcp-server
  6. - name: install isc-dhcp-server
  7. apt: pkg=isc-dhcp-server state=installed
  8. - name: create dhcp defaults
  9. template: src=isc-dhcp-server.j2 dest=/etc/default/isc-dhcp-server
  10. notify:
  11. - restart isc-dhcp-server
  12. - name: create dhcp config
  13. template: src=dhcpd.conf.j2 dest=/etc/dhcp/dhcpd.conf
  14. notify:
  15. - restart isc-dhcp-server
  16. - stat: path=/var/lib/dhcp/dhcpd.leases
  17. register: leases4_file