Ajouter Creation Host Zabbix
This commit is contained in:
parent
ee07da0a7f
commit
0c9690afcc
|
|
@ -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
|
||||||
Loading…
Reference in New Issue