peers as $peer) { if($peer->connection != NULL) $peers++; } return $peers; } $data = ""; {% for site in sites %} $fastd_{{ site.name }} = fastdGetPeers('/run/ff{{ site.name }}1.socket'); $data .= 'fastdclient,mtu=1280,host={{ ansible_hostname }},site={{ site.name }},type=backend value='.$fastd_{{ site.name }}."\n"; {% endfor %} sendflux($data); ?>