- 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: Mise en place du fichier conf zabbix agent (active) template: src: zabbix_agentd.conf.j2 dest: /etc/zabbix/zabbix_agentd.conf - name: Enable Zabbix agent service service: name: zabbix-agent state: restarted enabled: yes - name: remonter les machines command: curl -X POST -H "Content-Type: application/json" -d '{ "jsonrpc":"2.0","method":"host.create","params": {"host": "s-adm","groups": [{"groupid": "6"}],"templates": [{"templateid": "10343"}],"inventory_mode": 0,"inventory": {"type": 0}},"auth": "a44e2a4977d61a869437739cb6086ae42f4b9937fbb96aed24bbad028469a1cf","id": 1}' http://192.168.99.8/zabbix/api_jsonrpc.php