Ilya Kharin | fd293c4 | 2017-03-14 17:34:12 +0400 | [diff] [blame] | 1 | {%- from "devops_portal/map.jinja" import config with context %} |
Ilya Kharin | b327c93 | 2017-03-17 18:42:15 +0400 | [diff] [blame] | 2 | {%- if config.enabled|default(False) %} |
Ilya Kharin | 9954eaf | 2017-03-06 15:21:07 +0400 | [diff] [blame] | 3 | |
| 4 | devops_portal_dirs: |
| 5 | file.directory: |
| 6 | - names: |
Ilya Kharin | fd293c4 | 2017-03-14 17:34:12 +0400 | [diff] [blame] | 7 | - {{ config.base_dir }}/nginx |
| 8 | - {{ config.base_dir }}/config |
Ilya Kharin | 9954eaf | 2017-03-06 15:21:07 +0400 | [diff] [blame] | 9 | - user: root |
| 10 | - group: root |
| 11 | - mode: 0755 |
| 12 | - makedirs: true |
| 13 | |
| 14 | devops_portal_nginx_conf: |
| 15 | file.managed: |
Ilya Kharin | fd293c4 | 2017-03-14 17:34:12 +0400 | [diff] [blame] | 16 | - name: {{ config.base_dir }}/nginx/nginx.conf |
Ilya Kharin | 9954eaf | 2017-03-06 15:21:07 +0400 | [diff] [blame] | 17 | - 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 | |
| 25 | devops_portal_config: |
| 26 | file.managed: |
Ilya Kharin | fd293c4 | 2017-03-14 17:34:12 +0400 | [diff] [blame] | 27 | - name: {{ config.base_dir }}/config/config.json |
Ilya Kharin | 9954eaf | 2017-03-06 15:21:07 +0400 | [diff] [blame] | 28 | - source: salt://devops_portal/files/config.json |
| 29 | - template: jinja |
| 30 | - user: root |
| 31 | - group: root |
Ilya Kharin | 9d36fbe | 2017-03-15 23:14:38 +0400 | [diff] [blame] | 32 | - mode: 0644 |
Ilya Kharin | 9954eaf | 2017-03-06 15:21:07 +0400 | [diff] [blame] | 33 | - require: |
| 34 | - file: devops_portal_dirs |
| 35 | |
| 36 | {%- endif %} |