From deee69319fb6fbd6f2097f03063aa5b72b4d134b Mon Sep 17 00:00:00 2001 From: Jimmy Tang Date: Thu, 15 Jan 2015 16:15:38 +0000 Subject: [PATCH] Add mine_functions to master config template --- pillar.example | 5 +++++ salt/files/master.d/_defaults.conf | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/pillar.example b/pillar.example index 5aacc2c..abf2f82 100644 --- a/pillar.example +++ b/pillar.example @@ -9,6 +9,11 @@ salt: file_roots: base: - /srv/salt + mine_functions: + network.interfaces: [] + network.ip_addrs: [] + grains.items: [] + minion: master: salt fileserver_backend: diff --git a/salt/files/master.d/_defaults.conf b/salt/files/master.d/_defaults.conf index 0f9e297..1c55d41 100644 --- a/salt/files/master.d/_defaults.conf +++ b/salt/files/master.d/_defaults.conf @@ -817,6 +817,23 @@ peer_run: # web.*: # - network.* # - disk.* +{% if 'mine_functions' in cfg_master %} +mine_functions: + {% for name, roots in cfg_master['mine_functions'].items() %} + {{ name }}: + {% for mod in roots %} + - {{ mod }} + {% endfor %} + {% endfor %} +{% elif 'mine_functions' in cfg_salt %} +mine_functions: + {% for name, roots in cfg_salt['mine_functions'].items() %} + {{ name }}: + {% for mod in roots %} + - {{ mod }} + {% endfor %} + {% endfor %} +{% endif %} ##### Logging settings #####