andy27367451 发表于 2019-1-24 07:28:51

一个与zabbix

---
- hosts: urun
remote_user: root
tasks:
   - name: copy zabbix key config file
   copy: src=/etc/zabbix/zabbix_agentd.conf.d/get_disk_io.conf dest=/etc/zabbix/zabbix_agentd.conf.d/
   - name: copy disk io script file
   copy: src=/etc/zabbix/get_sda_riops.py dest=/etc/zabbix/
   - name: restart zabbix agentd service
   service: name=zabbix-agent state=restarted
- hosts: zabbix
remote_user: root
tasks:
   - name: copy zabbix key config file
   copy: src=/etc/zabbix/zabbix_agentd.conf.d/get_disk_io.conf dest=/usr/local/etc/zabbix_agentd.conf.d/
   - name: copy disk io script file
   copy: src=/etc/zabbix/get_sda_riops.py dest=/etc/zabbix/
   - name: stop zabbix agentd service
   shell: pkill zabbix_agentd
   - name: start zabbix agentd service
   shell: zabbix_agentd  




页: [1]
查看完整版本: 一个与zabbix