-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Allow provided templates to be extended through template inheritance #95
Comments
I see that this has been merged, but I still have a question relating to this. How can I override the template for each individual host? Say I have 3 sites in my installation, how can I easily have 3 completely different vhost configurations for them? The way I do it in my personal roles is something like this: nginx_sites:
- name: "My Site 1"
server_name: site1.example.com
template: "site1.example.com.site.j2"
- name: "My Site 2"
server_name: site2.example.com
template: "site2.example.com.site.j2"
- name: "My Site 3"
server_name: site3.example.com
template: "site3.example.com.site.j2" Being able to do something like this would be really great! I've started using this role for a different project, putting everything in the Thanks! |
I like it! Opened up a PR if @geerlingguy does too. |
Issue #95: Add support for setting template on a per vhost basis
I, uh... think I merged this, right? #weekendBrain |
Yep, has been merged! |
Issue geerlingguy#95: Add support for setting template on a per vhost basis
Trellis has a convention of splitting complicated Jinja2 templates into separete blocks that can be inherited in child templates.
Eg. their nginx vhost template https://github.com/roots/trellis/blob/master/roles/wordpress-setup/templates/wordpress-site.conf.j2
Drupal VM Issue geerlingguy/drupal-vm#1254
PR #92 (blocked by #91).
The text was updated successfully, but these errors were encountered: