- name: Install npm apt: state=latest name=npm - name: Create symlinks to nodejs file: src=/usr/bin/nodejs dest=/usr/bin/node state=link ignore_errors: yes - name: Install zbx_redis.conf synchronize: src=zbx_redis_conf.j2 dest="/etc/zabbix/zabbix_agentd.d/redis.conf" - name: Create directory for redis monitoring scripts file: path=/etc/zabbix/scripts/redis state=directory mode=0755 - name: Push zbx_redis_stats.js synchronize: src=zbx_redis_stats.js dest=/etc/zabbix/scripts/redis/ - name: Configure zbx_redis_stats.js shell: 'cd /etc/zabbix/scripts/redis/ && npm install redis && chmod +x zbx_redis_stats.js' - name: Restart zabbix-agent service service: name=zabbix-agent state=restarted