-
Notifications
You must be signed in to change notification settings - Fork 365
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
Two databases, two pillar files, one minion #219
Comments
It's probably not the formula overwriting the pillar. Run a salt-call
pillar.items and see if site1 and site2 show up. If not ensure your
saltmaster is configured with
pillar_merge_lists: True
…On 5/28/19 6:04 PM, Vince wrote:
I tried to break out the pillar config per website we are hosting on a
server and found that most formulas can handle it but not this one. I
would like to be able to define individual database level config per
pillar file if possible. Can anyone provide an example of defining two
databases in separate pillar files that would work on a single minion
with this formula?
As the formula currently stands, |site2.sls| config for the database
overwrites |site1.sls| config. The user configs however are properly
merged and work.
site1.sls
|mysql: database: - name: site1 character_set: utf8 user: site1-user:
password: site1-pass host: localhost databases: - database: site1
grants: ['select', 'insert', 'update', 'delete', 'create',
'alter','drop', 'index'] |
site2.sls
|mysql: database: - name: site2 character_set: utf8 user: site2-user:
password: site2-pass host: localhost databases: - database: site2
grants: ['select', 'insert', 'update', 'delete', 'create',
'alter','drop', 'index'] |
top.sls
|'example-host': - site1.sls - site2.sls |
I'm still new to modifying formulas but if someone could point me in a
direction I can try my hand at an update to make the formula more
flexible and support this. I am worried though that this could be a
big change to the functionality and would require everyone to update
their pillar files so it may not be welcomed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#219?email_source=notifications&email_token=AAFOWK6VPZ3WSSFOTVXUG7TPXW27VA5CNFSM4HQHYRMKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWLB2MQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFOWK4KLOLWOVFO5WPMJ7LPXW27VANCNFSM4HQHYRMA>.
|
Oh neat thx for the tip for that salt master config item. Its going to take a fair bit of testing across all of our states though before I can enable it in production as messing with pillar merge has the possibility of changing behaviour across all of our states. However, the default setting of https://docs.saltstack.com/en/latest/ref/configuration/master.html#pillar-merge-lists |
I tried to break out the pillar config per website we are hosting on a server and found that most formulas can handle it but not this one. I would like to be able to define individual database level config per pillar file if possible. Can anyone provide an example of defining two databases in separate pillar files that would work on a single minion with this formula?
As the formula currently stands,
site2.sls
config for the database overwritessite1.sls
config. The user configs however are properly merged and work.site1.sls
site2.sls
top.sls
I'm still new to modifying formulas but if someone could point me in a direction I can try my hand at an update to make the formula more flexible and support this. I am worried though that this could be a big change to the functionality and would require everyone to update their pillar files so it may not be welcomed.
The text was updated successfully, but these errors were encountered: