blob: 43bdf1de631e94d4540bc6f2a4ea925dc47ccdfa [file] [log] [blame]
Ilya Kharinfd293c42017-03-14 17:34:12 +04001{%- from "devops_portal/map.jinja" import config with context %}
Ilya Kharinb327c932017-03-17 18:42:15 +04002{%- if config.enabled|default(False) %}
Ilya Kharin9954eaf2017-03-06 15:21:07 +04003
4devops_portal_dirs:
5 file.directory:
6 - names:
Ilya Kharinfd293c42017-03-14 17:34:12 +04007 - {{ config.base_dir }}/nginx
8 - {{ config.base_dir }}/config
Ilya Kharin9954eaf2017-03-06 15:21:07 +04009 - user: root
10 - group: root
11 - mode: 0755
12 - makedirs: true
13
14devops_portal_nginx_conf:
15 file.managed:
Ilya Kharinfd293c42017-03-14 17:34:12 +040016 - name: {{ config.base_dir }}/nginx/nginx.conf
Ilya Kharin9954eaf2017-03-06 15:21:07 +040017 - source: salt://devops_portal/files/nginx.conf
18 - template: jinja
19 - user: root
20 - group: root
21 - mode: 0644
22 - require:
23 - file: devops_portal_dirs
24
25devops_portal_config:
26 file.managed:
Ilya Kharinfd293c42017-03-14 17:34:12 +040027 - name: {{ config.base_dir }}/config/config.json
Ilya Kharin9954eaf2017-03-06 15:21:07 +040028 - source: salt://devops_portal/files/config.json
29 - template: jinja
30 - user: root
31 - group: root
Ilya Kharin9d36fbe2017-03-15 23:14:38 +040032 - mode: 0644
Ilya Kharin9954eaf2017-03-06 15:21:07 +040033 - require:
34 - file: devops_portal_dirs
35
36{%- endif %}