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 #####