1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- - name: 'Install Zabbix agent'
- apt:
- pkg:
- - 'zabbix-agent'
- state: 'present'
- tags:
- - 'monitoring'
- - 'zabbix'
- - name: 'Install Zabbix agent config file'
- template:
- src: 'zabbix/agent.conf.j2'
- dest: '/etc/zabbix/zabbix_agentd.conf'
- owner: 'root'
- group: 'root'
- mode: '0644'
- notify:
- - 'Restart zabbix agent'
- tags:
- - 'monitoring'
- - 'zabbix'
- - name: 'Create zabbix plugins configuration directory'
- file:
- path: '/etc/zabbix/zabbix_plugins.conf.d'
- owner: 'root'
- group: 'root'
- mode: '0755'
- state: 'directory'
- when: zabbix_plugins_config|length > 0
- tags:
- - 'monitoring'
- - 'zabbix'
- - name: 'Install zabbix plugins configuration (ssl, web availability)'
- template:
- src: 'zabbix/plugins/{{ item }}.j2'
- dest: '/etc/zabbix/zabbix_plugins.conf.d/{{ item }}.yml'
- owner: 'root'
- group: 'root'
- mode: '0644'
- with_items:
- - 'ssl-discovery'
- - 'web-availability-discovery'
- when: zabbix_plugins_config|length > 0
- tags:
- - 'monitoring'
- - 'zabbix'
- # vim: ft=yaml.ansible
|