Created
September 11, 2020 09:28
-
-
Save tadeboro/fb824e641aa94761bb8f460f8bbd46e8 to your computer and use it in GitHub Desktop.
Templatng NGINX config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
{% for location in nginx_extra_basic_location_options %} | |
{{ location }}; | |
{% endfor %} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
gather_facts: false | |
vars: | |
nginx_extra_basic_location_options: | |
- include conf.d/whitelists/internal.conf | |
- deny all | |
tasks: | |
- name: Template the config | |
template: | |
src: input.j2 | |
dest: /tmp/output.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment