New to saltstack, I have created a base environment and seems to be working fine. Now I'm trying to setup a dev and prod environment so I can have have custom modules along with also adding some from the base environment.
However even with setting up a dev environment in my master config, all base and dev minions are getting the same modules.
These are the changes made to the salt master config file (etc/salt/master)
File Server setting
file_roots:
base:
- /opt/base/
dev:
- /opt/dev/
- /opt/base/
prod:
- /opt/prod/
top_file_merging_strategy: same
Node Groups
nodegroups:
dev: 'L@rnd301.com,rnd302.com,rnd304.com,rnd305.com'
Pillar settings
pillar_roots:
base:
- /opt/pillar
dev:
- /opt/dev/pillar
This is the dev top.sls config
dev:
'*':
- pw_new
base:
'*':
- sudo
- sshkeys
Base top.sls config
base:
'*':
- common
- sudo
- dns
- ntp
- repos
- history
- rootpw
When i run the salt-call i see that all the base files hit the dev minion along with base minions.
ID: pw_new
Function: user.present
Result: True
Comment: User rootpw_new is present and up to date
Started: 12:39:09.350877
Duration: 4.361 ms
Changes:
Summary for local
Succeeded: 49