-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge pillar dict data when using includes #7302
Comments
This would be useful. Thanks for the request. |
+1 I have a pretty significant need for this. I have a deployment system that configures itself via pillars, where each repository has separate configuration. Some targets need multiple repositories, but not all targets should be able to read all of the repo pillars. So, I have: In deployment/mediawiki_slot0.sls: repo_config: In deployment/mediawiki_slot1.sls: repo_config: In parsoid_Parsoid.sls: repo_Parsoid: In parsoid_config.sls: repo_config: In the above situation, I'd want to include mediawiki_slot1 and mediawiki_slot2 on one set of systems and parsoid_parsoid on another. So, I'd want my top to look like: 'mw*':
I'd want the generated pillar data on mw* to look like:
And the generated pillar data on parsoid* to look like:
This way I only specifically targeted systems can read the pillar data for their repos. The alternative is to name the pillar with the repo name, but that involves a lot of not-so-nice logic in my modules and states. |
Maybe it would be good to be able to specify whether the pillar will me merged or will overwrite, with a default of overwriting, as to preserve backwards compatibility. |
+1, it would allow much more flexible configuration. |
Now that I look at this one again, what differentiates it from #3991? Just curious if I'm missing something. |
Yeah, looks the same. |
Yea, I believe it is the same, you can close it as a duplicate. |
Alright, I'm going to close this one. I also wanted to say that this is a totally legitimate use case and we haven't forgotten about you guys! We definitely want to get this feature in. |
Pillars should be able to merge included pillars with the same dict name into a unified highstate pillar.
For example:
/srv/pillar/top.sls
/srv/pillar/postgres/init.sls
/srv/pillar/postgres/wale.sls
Should generate pillar data that would look like this:
The text was updated successfully, but these errors were encountered: