ansible-collections / community.zabbix

Zabbix Ansible modules
http://galaxy.ansible.com/community/zabbix
Other
318 stars 275 forks source link

Import Media type through xml #103

Open rockaut opened 4 years ago

rockaut commented 4 years ago
SUMMARY

Since 5.0 media types might also get imported through a xml file. It would be great if we not only can process them with a typical ansible action but also through an property like we have in template_xml? This would be great as most of the newer default zabbix mediatypes are provided out-of-the box through a git repo (https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/media)

ISSUE TYPE
COMPONENT NAME

zabbix_mediatype

D3DeFi commented 4 years ago

Means something like state: import to zabbix_mediatype?

D3DeFi commented 4 years ago

We've unfortunately failed to merge more generic module ansible/ansible#43311 into the upstream Ansible when we had a chance.

I wanted to modify and merge that PR here (initiative in #34), but something along time.. and other priorities... came to my way :/

Fortunate part is that source branch of that PR still exists so I should be able to cherry-pick them. Do you think something like that could satisfy this?

rockaut commented 4 years ago

Ad. https://github.com/ansible/ansible/pull/43311 I don't think that would be a good approach. I would guess the more Zabbix gives the possibilities to import from file the more they will split it in the frontend too. Imo having this in their own actions like you said with state: import would fit way better and also might make it more maintainable over time.

Here it would again help if there would be a module_util thing again like mentioned more times now.

D3DeFi commented 4 years ago

What about new modules zabbix_mediatype_import to not plague the old one even more?

Label this help wanted?