appsembler / configuration

a simple, but flexible, way for anyone to stand up an instance of the edX platform that is fully configured and ready-to-go
GNU Affero General Public License v3.0
15 stars 13 forks source link

format edx_ansible server-vars.yml nginx vars #347

Closed thraxil closed 3 years ago

thraxil commented 3 years ago

Preserve linebreaks in nginx specific extra locations vars when generating the server-vars.yml for edx_ansible.

The var: "" syntax strips linebreaks out and that leaves us with invalid nginx config files in some cases. Switch to var: | to allow multi-line content to go through correctly.

See my discussion in Slack last friday for details on how that broke nginx for us: https://appsembler.slack.com/archives/C0DLX9U86/p1612517691118600

As a longer term solution, we should probably just move everything from the nginx config files for custom domains that is duplicated across all of them (ie, everything that doesn't specify the hostname or the path to the SSL certs) into a single include file. Then when the cert agent runs the ansible playbook, it wouldn't have to touch that include file and there would be fewer things that could break. I'm looking into setting that up, but in the meantime, this should prevent the immediate problem from happening again.