salt: Minion Environment Is Being Ignored
Basically I have two environments configured and I have my minions isolated via their configuration file to a specific environment. However when I run state.highstate, minions match up to both top.sls files that reside in different environment definitions.
dev/top.sls
dev:
'*':
- users
test/top.sls
test:
'*':
- users
I have minions whose configuration specifically have environment: test and environment: dev, according to the docs it should isolate them to a specific environment on the master, the behavior indicates otherwise.
Current workaround is to use compound matching and to set the grain environment:dev and then always do ‘G@environment:dev|testing’ in all my top.sls definitions.
Salt version: 0.17.4
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 19 (14 by maintainers)
Same issue here with a slightly different setup. Also using 0.17.4.
I’m using the Gitfs backend. I have some modified states in a branch called ‘fix-permissions’. I create a brand new machine with a master & minion on it, plug it into Git, and, in the minion config, I have
environment: fix-permissions
.When I run a
salt-call
on the minion, though, it pulls from environmentbase
. I can see that in the debug output and can tell by the output of the states it runs. Same for a normal saltstate.sls
. Keeps pulling frombase
.The odd part is I had done this to another dev box the other day and the environment config line in the minion worked.
I just tested out making a topfile instead and specifying the branch/environment from there and that seemed to work. I think I’ll just shift to writing out a topfile. It’ll force me to use better organization anyway.