-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnginx.sls
41 lines (36 loc) · 1.08 KB
/
nginx.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
nginx:
pkgrepo.managed:
- ppa: nginx/stable
- required_in:
- pkg: nginx
pkg.installed:
- require:
- pkgrepo: nginx
service:
- running
- watch:
- file: /etc/nginx/sites-available/api
- file: /etc/nginx/sites-enabled/api
- file: /etc/nginx/sites-available/default
- file: /etc/nginx/sites-enabled/default
/etc/nginx/sites-available/api:
file.managed:
- source: salt://etc/nginx/sites-available/api
- require:
- pkg: nginx
/etc/nginx/sites-enabled/api:
file.symlink:
- target: /etc/nginx/sites-available/api
- require:
- file: /etc/nginx/sites-available/api
/etc/nginx/sites-available/default:
file.managed:
- source: salt://etc/nginx/sites-available/default
- require:
- pkg: nginx
/etc/nginx/sites-enabled/default:
file.symlink:
- target: /etc/nginx/sites-available/default
- require:
- file: /etc/nginx/sites-available/default
# vim:set ft=yaml: