I'm new to Salt, starting to get some traction, but still get hung up on what seem like basic issues.
Right now, I'm using the 'users' formula to handle accounts on a minion. It was going really well, I've got a couple hundred accounts under control there... but then today I realized that I only have the users formula listed once in my top.sls, and as soon as I start trying to manage accounts on more than a single minion, I'll have problems.
I've tried everything I can think of to differentiate pillar files, with either no effect (minions still see data they shouldn't), or errors.
I've read:
Specifically,
...but I'm missing something.
What's currently working:
In top.sls I have:
'ftp*':
- users
...and in my pillar I have files that start with:
users:
...followed by lists of either:
jblow:
uid: xxx
fullname: joe blow
home: /home/jblow
[...]
...or,
jblow:
password: [hash string]
I've tried to subdivide things in all kinds of ways, but none of my guess have been right. For instance, in top.sls:
'host:ftp*':
- match: grains
- ftp-users
And in the pillar,
ftp-users:
users:
[same stuff as above]
That doesn't seem to do anything. All my other minions with a 'users:' field in the top file would still get everything the ftp minions get.
If I just try changing 'users:' to some other string, in both top.sls and the pillar, obviously we lose sight of the users formula, so that can't be right.
The only thing I can think of that I know would work, is to copy the users formula and do some kind of string replace on all the 'user' and 'users' fields, for each category of minions that I want to configure. But I know that *really* can't be right, defeats the whole purpose.
I'm missing something basic.