浏览代码

Add mine_functions to master config template

tags/v0.57.0
Jimmy Tang 9 年前
父节点
当前提交
deee69319f
共有 2 个文件被更改,包括 22 次插入0 次删除
  1. +5
    -0
      pillar.example
  2. +17
    -0
      salt/files/master.d/_defaults.conf

+ 5
- 0
pillar.example 查看文件

file_roots: file_roots:
base: base:
- /srv/salt - /srv/salt
mine_functions:
network.interfaces: []
network.ip_addrs: []
grains.items: []

minion: minion:
master: salt master: salt
fileserver_backend: fileserver_backend:

+ 17
- 0
salt/files/master.d/_defaults.conf 查看文件

# web.*: # web.*:
# - network.* # - network.*
# - disk.* # - 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 ##### ##### Logging settings #####

正在加载...
取消
保存