Permalink
Browse files

Fix Jinja2 bug in collectd SLS.

Signed-off-by: Volker Theile <votdev@gmx.de>
  • Loading branch information...
votdev committed Sep 14, 2018
1 parent 8e469c7 commit a28068baef465543ee6dc11fa204902d5c30f58c
Showing with 3 additions and 3 deletions.
  1. +3 −3 deb/openmediavault/srv/salt/omv/deploy/collectd/plugins/interface.sls
@@ -21,11 +21,11 @@
{% for interface in salt['omv.get_config_by_filter'](
'conf.system.network.interface',
'{"operator": "or", "arg0": {"operator": "stringEquals", "arg0": "type", "arg1": "ethernet"}, "arg1": {"operator": "stringEquals", "arg0": "type", "arg1": "wireless"}}') %}
{% set used = salt['omv.get_config_by_filter'](
{% set used_by = salt['omv.get_config_by_filter'](
'conf.system.network.interface',
'{"operator": "stringContains", "arg0": "slaves", "arg1": "' ~ interface.devicename ~ '"}') %}
{% if used | length == 0 %}
{% set interfaces = interfaces.append(interface) %}
{% if used_by | length == 0 %}
{% set _ = interfaces.append(interface) %}
{% endif %}
{% endfor %}
{% set interfaces = interfaces + salt['omv.get_config_by_filter'](

0 comments on commit a28068b

Please sign in to comment.