Files
ansible/test_zabbix_connection.yml
2024-06-14 08:40:04 +02:00

24 lines
648 B
YAML

---
- name: Test Zabbix API connection
hosts: localhost
gather_facts: no
tasks:
- name: Set API token
ansible.builtin.set_fact:
ansible_zabbix_auth_key: "6965e0d3bf4416a15ce750e7dba47933d3dfc988d99d866291b0f2d55845bb05"
- name: Configure HTTPAPI connection
ansible.builtin.set_fact:
ansible_httpapi_use_ssl: false
ansible_httpapi_validate_certs: false
- name: Test Zabbix API connection
community.zabbix.zabbix_api_info:
http_login_user: "Admin"
http_login_password: "zabbix"
register: result
- name: Debug Zabbix API version
debug:
var: result