salt reactor 自动完成Minion的证书签发和根据不同的业务完成不同states配置

前端之家收集整理的这篇文章主要介绍了salt reactor 自动完成Minion的证书签发和根据不同的业务完成不同states配置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


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

猜你在找的React相关文章