    - name: Intallation paquet zabbix agent
      get_url:
        url: "https://repo.zabbix.com/zabbix/6.4/debian/pool/main/z/zabbix-release/zabbix-release_6.4-1+debian12_all.deb" 
        dest: "/tmp"

    - name: Intallation paquet zabbix agent suite
      apt:
        deb: "/tmp/zabbix-release_6.4-1+debian12_all.deb"
        state: present

    - name: Update apt
      apt:
        update_cache: yes

    - name: Intallation Zabbix agent
      apt:
        name: zabbix-agent
        state: present

    - name: Enable Zabbix agent service
      systemd:
        name: zabbix-agent
        state: restarted
        enabled: yes
        
    - name: Rm package
      file:
        path: "/tmp/zabbix-release_6.4-1+debian12_all.deb"
        state: absent

    - name: config
      template:
        src: zabbix_agentd.conf.temp
        dest: /etc/zabbix/zabbix_agentd.conf
      vars:
        PidFile: "/run/zabbix/zabbix_agentd.pid"
        LogFile: "/var/log/zabbix/zabbix_agentd.log"
        LogFileSize: "0"
        Server: "127.0.0.1"
        ServerActive: "192.168.99.8"
        Hostname: "{{ ansible_hostname }}"
        Include: "/etc/zabbix/zabbix_agentd.d/*.conf"
