-
-
Save whytewolf/d519a4b473dea21e6f122166394a00de to your computer and use it in GitHub Desktop.
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
{% if salt.grains.get('id') in salt.pillar.get('nginx:apps',{}) %} | |
{% set app = salt.grains.get('id') %} | |
{% else %} | |
{% set app = 'default' %} | |
{% endif %} | |
/etc/nginx/sites-available/{{ app }}: | |
file.managed: | |
- source: salt://nginx/files/etc/nginx/sites-available/{{ app }}.jinja | |
- template: jinja | |
- user: root | |
- group: root | |
- mode: 640 | |
/etc/nginx/sites-enabled/{{ app }}: | |
file.symlink: | |
- target: /etc/nginx/sites-available/{{ app }} | |
- require: | |
- file: /etc/nginx/sites-available/{{ app }} |
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
nginx: | |
apps: | |
- gb-api | |
- other-app | |
- second |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment