puppet-zabbix icon indicating copy to clipboard operation
puppet-zabbix copied to clipboard

Move zabbix_(url|user|pass) and apache_use_ssl to config file

Open baurmatt opened this issue 6 years ago • 2 comments
trafficstars

(I removed the default template because doesn't really apply to a feature)

Problem to solve

The current zabbix types/provider are pretty hacky. Some examples:

  • puppet resource purging isn't possible (self.instances isn't implemented)
  • zabbix_host doesn't allow ipaddress, use_ip, proxy, ... to be changed
  • If templates get added to/from zabbix_host the change isn't properly show. Puppet only says Notice: /Stage[main]/Zabbix_host[example.org]/ensure: current_value 'absent', should be 'present'
  • Other types/provider have most certainly the same problem as zabbix_host

Proposal

  • Implement self.instances/self.prefetch for all providers and change current type params to properties where needed. This will allow Puppet itself to determine which things need to change and will allow proper logging of the change Notice: /Stage[main]/Main/Zabbix_host[example.org]/ipaddress: current_value '10.0.0.2', should be '10.0.0.1'
  • To implement self.instances we need the credentials to be available outside of the type. This is required because self.instances cannot access the zabbix_(url|user|pass) params of the custom type

baurmatt avatar Dec 12 '18 13:12 baurmatt

Hi @baurmatt, the proposal sounds good. Sadly I won't have time in the next weeks to implement something like this. If you're willing to do this I'm happy to give it a review and merge it.

bastelfreak avatar Dec 21 '18 11:12 bastelfreak

Hey @bastelfreak, thanks for taking the time to review my proposal. I'm happy to implement this myself, in fact I'm already have a large portion of it implement in our fork. I will add PRs over time which inclemently implement this.

baurmatt avatar Dec 21 '18 12:12 baurmatt