tyrtyrt 发表于 2017-3-10 15:28:20

一个与zabbix-agentd有关的playbooks任务

---
- 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-agentd有关的playbooks任务