Install and configure Zabbix agent. Firewall and yum repository configuration is not part of this role. Check section Dependencies
for example roles which you can use.
- Zabbix 5.4+
- RHEL8
- YUM repository with zabbix-agent package
zabbix_agent_packages
- list of zabbix packages to installzabbix_agent_config_path
- path to mail zabbix agent config filezabbix_agent_config_d_path
- path to zabbix agent.d config directoryzabbix_agent_config
- list of settings for zabbix_agentd.conf, example:
zabbix_agent_config:
- option: Server
value: zabbix-server.example.com
zabbix_agent_service_name
- name of zabbix agent servicezabbix_agent_custom_files
- list of custom files to copy, example:
zabbix_agent_custom_files"
- dest: /etc/zabbix/tls/zabbix.key
content: "{{ lookup('file', inventory_dir+'/../files/zabbix.key') }}"
owner: zabbix
group: zabbix
mode: "0400"
Collections:
community.general
Roles (optional):
- hosts: my_servers
vars:
repos_from_rpm:
- https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm
firewalld_ports:
- port: 10050
protocol: tcp
zabbix_agent_config:
- option: Server
value: zabbix-server.example.com
roles:
- ansible-role-firewalld
- ansible-role-repos
- ansible-role-zabbix_agent
GPLv3
Vladimir Vasilev (@vladi-k)