{# Copyright (C) 2014-2016 Nick Janetakis <nick.janetakis@gmail.com>
 # Copyright (C) 2014-2017 Maciej Delmanowski <drybjed@gmail.com>
 # Copyright (C) 2016      Reto Gantenbein <reto.gantenbein@linuxmonk.ch>
 # Copyright (C) 2014-2017 DebOps <https://debops.org/>
 # SPDX-License-Identifier: GPL-3.0-only
 #}
{% set elasticsearch__tpl_output = [] %}
{% for plugin in ([ elasticsearch__combined_plugins ] if elasticsearch__combined_plugins is mapping else elasticsearch__combined_plugins) %}
{%   if plugin.state|d('present') != 'absent' %}
{%     if plugin.configuration|d() %}
{%       set _ = elasticsearch__tpl_output.append(plugin.configuration) %}
{%     elif plugin.config|d() %}
{%       set _ = elasticsearch__tpl_output.append(plugin.config) %}
{%     endif %}
{%   endif %}
{% endfor %}
{{ elasticsearch__tpl_output | to_yaml }}
