Add LWRP to upload template to server
It would appear the the Template LWRP can only create a template. It doesn't allow the uploading of an xml template file.
Ideally it'd be great if this could be done, with a sample recipe to show how to use it.
I wanted to add this feature to the cookbook, but unfortunately Zabbix API itself does not support adding the XML data directly to a template create or update. See here. According to the documentation of the unreleased 2.4 branch it will not be supported in that version either.
The only solution already available is to parse the XML for yourself and make multiple API calls for inserting the "empty" template first, then all of the items, applications, triggers in that template separately via the item, application, trigger API endpoints respectively. This would be a pretty huge work in this cookbook, so I guess this should be implemented in Zabbix API itself.
@guilhem What do you think of this?