From b8e53771f342f1aff54f2d6e3baf4f32797548aa Mon Sep 17 00:00:00 2001 From: Niels Abspoel Date: Thu, 19 Feb 2015 21:59:44 +0100 Subject: [PATCH] add mine_get function to master config --- salt/files/master.d/_defaults.conf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/salt/files/master.d/_defaults.conf b/salt/files/master.d/_defaults.conf index 4b5a280..53cbd41 100644 --- a/salt/files/master.d/_defaults.conf +++ b/salt/files/master.d/_defaults.conf @@ -811,12 +811,30 @@ peer_run: # The example below enables minion foo.example.com to get 'network.interfaces' mine # data only, minions web* to get all network.* and disk.* mine data and all other # minions won't get any mine data. +{% if 'mine_get' in cfg_master -%} +mine_get: +{%- for minion, data in cfg_master['mine_get']|dictsort %} + {{ minion }}: +{%- for command in data %} + - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %} +{%- endfor -%} +{%- endfor -%} +{% elif 'mine_get' in cfg_salt -%} +mine_get: +{%- for minion, data in cfg_salt['mine_get']|dictsort %} + {{ minion }}: +{%- for command in data %} + - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %} +{%- endfor -%} +{%- endfor -%} +{% else -%} # mine_get: # foo.example.com: # - network.interfaces # web.*: # - network.* # - disk.* +{%- endif %} ##### Logging settings #####