Ansible Playbook – Centos/RHEL for Zabbix Agent 6
# ansible-playbook -i inventory agent.yaml -u centos --key-file=node.pem -b | |
--- | |
- hosts: agents | |
gather_facts: false | |
tasks: | |
- name: disable SELinux | |
selinux: | |
state: disabled | |
- name: install pcre2 | |
yum: | |
name: "pcre2-devel.x86_64" | |
- name: install zabbix centOS 7 rpm file | |
yum: | |
name: "https://repo.zabbix.com/zabbix/6.0/rhel/7/x86_64/zabbix-agent-6.0.0-1.el7.x86_64.rpm" | |
validate_certs: no | |
- name: upgrade all packages | |
yum: name=* state=latest | |
- name: install zabbix-agent 6.x for centOS 7 | |
yum: | |
name: zabbix-agent | |
state: latest | |
- name: Copy zabbix_agentd.conf file with owner and permissions | |
ansible.builtin.copy: | |
src: zabbix_agentd.conf | |
dest: /etc/zabbix/zabbix_agentd.conf | |
- name: Start service Zabbix Agent, if not started | |
ansible.builtin.service: | |
name: zabbix-agent | |
state: started |
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND
Never disable SELInux. Only clueless beginners do that.