即使我在命令行界面上运行salt '*' state.apply,有没有办法不让minion成为攻击目标?
理想情况下,排除应该在top.sls中的某个位置声明
发布于 2018-08-10 19:37:12
你想使用复合匹配。将can服务器状态的所有minion作为目标,除了minion_id_1,可以这样做。
base:
'not minion_id_1':
- match: compound
- webserver有关复合匹配的文档可在此处找到:docs.saltstack.com/en/latest/topics/targeting/compound.html
发布于 2018-08-11 19:00:27
从CLI中,您可以按如下方式排除minion,
salt -C 'not minion-id' test.ping以上模式从2015.8.0版本开始提供。如果您使用的是旧版本,
salt -C '* and not minion-id' test.ping请阅读更多关于Compound matchers here的信息。
https://stackoverflow.com/questions/51783641
复制相似问题