Closed TD-4242 closed 6 years ago
Wow, RuboCop hates me. will fix shortly. and start using RuboCop on all my stuff.
+1 for me @guilhem what do you think ?
I'm :+1: about this idea.
Just need to fix my inline comment and maybe to add some kitchen suite/test about this feature.
EDIT: and also to squash it to something cleaner ;)
Thanks for the feedback I will fix and resubmit.
Question on the services, in recipe/agent.rb what's with the ruby block for start/enabling the service? It cause a resource to update every client run and doesn't seem to do anything. Mind if I get rid of it?
ruby_block 'start service' do block do true end Array(node['zabbix']['agent']['service_state']).each do |action| notifies action, 'service[zabbix_agentd]' end end
:heart: this. Is there any chance of getting it merged?
I've been working on a huge refactor of the zabbix agent code to strip the server dependencies from the cookbook. If you'd like to help me test you can check it out from: https://github.com/TD-4242/zabbix-agent The code has been simplified and has many chefspec tests added. I just got it added to travis-ci last night and I'm working on the build scripts.
the LWRPs have not been touched and wont work in their current state. Otherwise it should work for installing, configuring and starting the zabbix agent from packages. It may work from source too.
This will allow the agent to be installed from either rpm or dev packages.
By default this points to repo.zabbix.com and the appropriate directories. Although, that can be overwritten with an attribute.
I had to create an attribute for the service name due to the packages having it as zabbix-agent and the templates using zabbix_agentd. This should have no effect on any other install method as it maintains the same service name for any non packaged version.
Redhat/CentOS is untested as I don't have easy access to that OS currently.
I will be creating this install source for the server and web portions as well.