From 0c9690afcc2d36fdec63d41ee3df38bb7ee30440 Mon Sep 17 00:00:00 2001 From: "l.covela" Date: Fri, 28 Nov 2025 16:11:36 +0100 Subject: [PATCH] Ajouter Creation Host Zabbix --- Creation Host Zabbix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Creation Host Zabbix diff --git a/Creation Host Zabbix b/Creation Host Zabbix new file mode 100644 index 0000000..b18b313 --- /dev/null +++ b/Creation Host Zabbix @@ -0,0 +1,27 @@ +- name: Create Zabbix host + hosts: zabbix + gather_facts: no + vars: + ansible_network_os: community.zabbix.zabbix + ansible_connection: httpapi + ansible_httpapi_port: 443 + ansible_httpapi_use_ssl: true + ansible_httpapi_validate_certs: false + ansible_zabbix_url_path: "" + + tasks: + - name: Create Zabbix host + community.zabbix.zabbix_host: + host_name: "{{ inventory_hostname }}" + host_groups: "{{ zabbix_agent_groups }}" + link_templates: "{{ zabbix_agent_link_templates }}" + status: enabled + state: present + inventory_mode: automatic + interfaces: + - type: agent + main: 1 + ip: "{{ ansible_private_host }}" + useip: 1 + changed_when: false + tags: api