zabbix.yml 897 B

12345678910111213141516171819202122232425262728293031323334353637
  1. - name: 'Install Zabbix agent'
  2. apt:
  3. pkg: '{{ item }}'
  4. state: 'installed'
  5. with_items:
  6. - 'zabbix-agent'
  7. - name: 'Install Zabbix agent config file'
  8. template:
  9. src: 'zabbix/agent.conf.j2'
  10. dest: '/etc/zabbix/zabbix_agentd.conf'
  11. owner: 'root'
  12. group: 'root'
  13. mode: '0644'
  14. notify:
  15. - 'Restart zabbix agent'
  16. - name: 'Create zabbix plugins configuration directory'
  17. file:
  18. path: '/etc/zabbix/zabbix_plugins.conf.d'
  19. owner: 'root'
  20. group: 'root'
  21. mode: '0755'
  22. state: 'directory'
  23. when: zabbix_plugins_config
  24. - name: 'Install zabbix plugins configuration (ssl, web availability)'
  25. template:
  26. src: 'zabbix/plugins/{{ item }}.j2'
  27. dest: '/etc/zabbix/zabbix_plugins.conf.d/{{ item }}.yml'
  28. owner: 'root'
  29. group: 'root'
  30. mode: '0644'
  31. with_items:
  32. - 'ssl-discovery'
  33. - 'web-availability-discovery'
  34. when: zabbix_plugins_config