Skip to content

Instantly share code, notes, and snippets.

@vbabiy
Last active December 22, 2015 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vbabiy/6505075 to your computer and use it in GitHub Desktop.
Save vbabiy/6505075 to your computer and use it in GitHub Desktop.
nginx:
pkg:
- installed
service:
- running
- require:
- pkg: nginx
- watch:
- file: /etc/nginx/sites-enabled/{{ pillar['application']['name'] }}
/etc/nginx/sites-enabled/default:
file.absent:
- watch_in:
- service: nginx
/etc/nginx/sites-available/{{ pillar['application']['name'] }}:
file.managed:
- template: jinja
- source: salt://nginx/files/site-conf
/etc/nginx/sites-enabled/{{ pillar['application']['name'] }}:
file.symlink:
- target: /etc/nginx/sites-available/{{ pillar['application']['name'] }}
- require:
- file: /etc/nginx/sites-available/{{ pillar['application']['name'] }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment