-
Notifications
You must be signed in to change notification settings - Fork 81
feat: Add uwsgi
template support
#569
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
base: main
Are you sure you want to change the base?
Conversation
✅ All required contributors have signed the F5 CLA for this PR. Thank you! |
I have hereby read the F5 CLA and agree to its terms |
Thanks for the PR @hax0rbana-adam! Given how modules are implemented, and how big the |
Yeah, I'll give that a shot. It might take me a bit to come back to the project that needs this, but I expect to be able to get to it within a week or two. Thank you for succinctly and politely explaining why you want it to be done differently. I really appreciate the welcoming tone. ❤️ |
Edit: I took a stab at it. It doesn't work, but I think it might be closer than my first attempt. The current error is "AnsibleUndefinedVariable: the template 'http/uwsgi.j2' (imported on line 313) does not export the requested name 'uwsgi'." (and that's line 313 of Original commentOK, I'm having trouble understanding the structure here. Perhaps working through an example would help. In my first attempt, I had my variables set up like this (I tried to strip out things nor relevant to this change): nginx_config_http_template:
- backup: false
config:
servers:
- core:
server_name: "{{lemur_allowable_hostname}}"
listen:
- address: 0.0.0.0
port: 443
default_server: true
ssl: true
locations:
- location: '~ /\.ht'
access:
deny: all
- location: /
core:
uwsgi_pass: django
include: /etc/nginx/uwsgi_params I believe the proposed change would mean that last bit would change to something like this: - location: /
core:
uwsgi:
pass: django
include: /etc/nginx/uwsgi_params If that's not correct, then everything else I'm about to say will be misguided. The proxy module seems to have been included from default.conf.j2 and not from the core.j2 that I modified. But if that's true, I don't know how everything would fit together. It seems like my new I think I just need a few pointers so I can get this in integrated. |
Proposed changes
Anyone who wants to use uwsgi has to edit their configuration after deploying using nginx_config because the uwsgi_pass directive is not supported by this role.
This change will allow specifying the uwsgi_pass directive from within the role, eliminating the need to patch up the configuration file after the fact.
Checklist
Before creating a PR, run through this checklist and mark each as complete:
defaults/main/*.yml
,README.md
andCHANGELOG.md
).