
我正在寻找一种根据 saltenv 或 pillarenv 变量选择外部支柱的方法。
根据 saltstack 文档,ext_pillar
不支持与pillar_roots
(相同的语法https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-roots和https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-roots)
有没有办法做到这一点 ?
答案1
是的,因为文档状态,使用关键字。它与 git 结合使用最有意义,其中__env__
分支和标签代表pillarenv
ext_pillar:
- git:
- __env__ https://gitserver/git-pillar.git:
- root: pillar