From 9ef5335f7bafee9d6f3f32e67630f2c0604f6ca7 Mon Sep 17 00:00:00 2001 From: Andrew Ernst Date: Fri, 29 Sep 2017 13:13:00 -0700 Subject: [PATCH] Update f_defaults.conf to support elasticsearch returner (#335) Proposed pull request for elasticsearch returner in the minion.d/f_defaults.conf file --- salt/files/minion.d/f_defaults.conf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/salt/files/minion.d/f_defaults.conf b/salt/files/minion.d/f_defaults.conf index 3129d24..ddc2860 100644 --- a/salt/files/minion.d/f_defaults.conf +++ b/salt/files/minion.d/f_defaults.conf @@ -1212,6 +1212,24 @@ return: #event_match_type: startswith {{ get_config('event_match_type', 'startswith') }} +{% if 'elasticsearch' in cfg_minion -%} +{%- do default_keys.append('elasticsearch') %} +{%- do default_keys.append('return') %} +##### elasticsearch connection settings ##### +########################################## +{%- for name, value in cfg_minion['elasticsearch'].items() %} +{%- if value is list %} +elasticsearch.{{ name }}: +{%- for objvalue in value %} + - {{ objvalue }} +{%- endfor %} +{%- else %} +elasticsearch.{{ name }}: {{ value }} +{%- endif %} +{%- endfor %} +{%- endif %} + + {% if 'mongo' in cfg_minion -%} {%- do default_keys.append('mongo') %} ##### mongodb connection settings #####