Skip to content

msl0/ansible_zabbix_dynamic_inventory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

zabbix_inventory.py

Python script to retrieve data from Zabbix API and convert it to Ansible inventory format

Requirements

  • Python3
  • pyzabbix

How to use

  1. Download zabbix_inventory.py on Ansible control node
  2. Install pyzabbix pip3 install pyzabbix
  3. Modify file
    • Zabbix URL: line 23
    • Zabbix user credentials: line 29
    • optionaly adjust hostgroup criteria to limit groups: line 38 - 45
  4. Change permissions to allow execute chmod +x zabbix_inventory.py
  5. Verify ansible-inventory -i zabbix_inventory.py --list

Note

The script has been tested on Zabbix 5.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages