- hosts: all tasks: - name: Installation des paquets apt: name: isc-dhcp-server state: present - name: Copie du fichier de conf template: src: dhcpd.conf dest: /etc/dhcp/dhcpd.conf notify: - restart isc-dhcp-server - name: Copie du fichier de conf template: src: isc-dhcp-server dest: /etc/default/isc-dhcp-server notify: - restart isc-dhcp-server handlers: - name: restart isc-dhcp-server service: name: isc-dhcp-server state: restarted