---
- 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