{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' runuser -u node_exporter -- ' if vrf is vyos_defined else '' %} [Unit] Description=Blackbox Exporter Documentation=https://github.com/prometheus/blackbox_exporter After=network.target [Service] {% if vrf is not vyos_defined %} User=node_exporter {% endif %} ExecStart={{ vrf_command }}/usr/sbin/blackbox_exporter \ {% if listen_address is vyos_defined %} {% for address in listen_address %} --web.listen-address={{ address }}:{{ port }} \ {% endfor %} {% else %} --web.listen-address=:{{ port }} \ {% endif %} --config.file=/run/blackbox_exporter/config.yml [Install] WantedBy=multi-user.target