- hosts: all tasks: - name: Installation des paquets apt: name: ['bind9','dnsutils'] state: present - name: Remplacement des fichier de conf ansible.builtin.copy: src: bind/ dest: /etc/bind notify: - restart bind9 handlers: - name: restart bind9 service: name: bind9 state: restarted