Roots Discourse

Separate Mail Config for Staging/Production

I’m setting up separate smtp accounts for staging and production using Amazon SES.

I’ve copied mail.yml from /all into each environment and added the vault_mail_password variable to each environment’s vault.yml.

I just wanted to make sure this will be fine, as these files should be read after /all. I figured that I’d check to make sure since this is my first deploy using Roots.

I am using a plugin for configuring the SMTP settings per site:

It would be nice though if there is a plugin or bedrock feature that allows setting these settings per site using environment variables, then Trellis vault can be used in combination.

Ansible looks for variables in group_var/<env>/xxx.yml first, if not find, falls back to group_var/all/xxx.yml
Thus, defining enviroment specific variables under group_var/<env>/xxx.yml is oerfectly fine and expected.