cat/etc/salt/master file_roots: base: -/srv/salt/base prod: -/srv/salt/prod interface:192.168.1.100 reactor: -'salt/auth': -/srv/reactor/Minion.sls -'salt/minion/Minion/start': -/srv/reactor/auto.sls
auto.sls run_state: local.state.sls: -tgt:{{data['id']}} -arg: -shencan run_init: local.cmd.run: -tgt:{{data['id']}} -arg: -echoinitsok>>/tmp/cpis Minion.sls {%if'act'indataanddata['act']=='pend'%} minion_add: wheel.key.accept: -match:{{data['id']}} {%endif%} shencan.sls这个位置/srv/salt/base /tmp/example: file.managed: -source:salt://example
catminion master:192.168.1.100 id:Minion
客户端启动后自动签发
具体看书
http://www.51niux.com/?id=120 SaltStack系列(五)之各种组件
https://docs.saltstack.com/en/latest/topics/reactor/
更新 file_roots: base: -/srv/salt/base prod: -/srv/salt/prod interface:192.168.1.100 reactor: -'salt/auth': -/srv/reactor/auth.sls -'salt/minion/*/start': -/srv/reactor/auto.sls原文链接:https://www.f2er.com/react/303108.html