Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ansible batch installation of zabbix-agent

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Centos7.x

Ansible-I add_zabbix_list zabbix-s-m shell-a "rpm-iUh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-agent-4.0.1-1.el7.x86_64.rpm""

Ansible-I add_zabbix_list zabbix-s-m shell-a "ls-la / etc/zabbix"

Ansible-I add_zabbix_list zabbix-s-m copy-a "src=/etc/zabbix dest=/etc owner=root group=root mode=0755"

Ansible-I add_zabbix_list zabbix-s-m shell-a "sed-I'/ Hostname/s/ ^ / # / g'/ etc/zabbix/zabbix_agentd.conf"

Ansible-I add_zabbix_list zabbix-s-m shell-a'echo "Hostname= `hostname`" > > / etc/zabbix/zabbix_agentd.conf'

Ansible-I add_zabbix_list zabbix-s-m file-a "path=/data/zabbixdata state=directory recurse=yes owner=zabbix group=zabbix"

Ansible-I add_zabbix_list zabbix- s-m systemd-a "name=zabbix-agent state=started"

Ansible-I add_zabbix_list zabbix- s-m systemd-a "name=zabbix-agent state=started enabled=true"

Ansible-I add_zabbix_list zabbix-s-m shell-a "cat / etc/zabbix/zabbix_agentd.conf"

Ansible-I add_zabbix_list zabbix-s-m shell-a "netstat-lntup | grep 10050"

Centos6.x

Ansible-I t3_test_list test-s-m shell-a "rpm-iUh https://repo.zabbix.com/zabbix/4.0/rhel/6/x86_64/zabbix-agent-4.0.1-1.el6.x86_64.rpm""

Ansible-I t3_test_list test-s-m shell-a "rpm-qa | grep zabbix"

Ansible-I t3_test_list test-s-m shell-a "ls-la / etc/zabbix"

Ansible-I t3_test_list test-s-m unarchive-a "src=/data/scripts/iplistfile/zabbix.tar.gz dest=/etc/ owner=root group=root"

Ansible-I t3_test_list test-s-m service-a "name=zabbix-agent state=started enabled=true"

Ansible-I t3_test_list test-s-m shell-a "service zabbix-agent stop"

Ansible-I t3_test_list test-s-m shell-a "sed-I'/ Hostname/s/ ^ / # / g'/ etc/zabbix/zabbix_agentd.conf"

Ansible-I t3_test_list test-s-m shell-a'echo "Hostname= `hostname`" > > / etc/zabbix/zabbix_agentd.conf'

Ansible-I t3_test_list test-s-m file-a "path=/data/zabbixdata state=directory recurse=yes owner=zabbix group=zabbix"

Ansible-I t3_test_list test-s-m service-a "name=zabbix-agent state=started"

Ansible-I t3_test_list test-s-m shell-a "netstat-lntup | grep 10050"

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report