# {{ ansible_managed }} # /etc/nut/upssched/upsscript #! /bin/sh case $1 in onbatt) {% for host in ups_hosts %} ssh root@{{ host }} {% endfor %} ;; lowbatt) /sbin/upssched fsd;; *) echo "wrong Parameter";; esac