|
2 | 2 |
|
3 | 3 | {% set config_file = salt['pillar.get']('haproxy:config_file_path', haproxy.config_file) %} |
4 | 4 | haproxy.config: |
5 | | - file.managed: |
6 | | - - name: {{ config_file }} |
7 | | - - source: {{ haproxy.config_file_source }} |
8 | | - - template: jinja |
9 | | - - user: {{ haproxy.user }} |
10 | | - - group: {{ haproxy.group }} |
11 | | - - mode: 644 |
12 | | - - require_in: |
13 | | - - service: haproxy.service |
14 | | - - watch_in: |
15 | | - - service: haproxy.service |
16 | | - {% if salt['pillar.get']('haproxy:overwrite', default=True) == False %} |
17 | | - - unless: |
18 | | - - test -e {{ config_file }} |
19 | | - {% endif %} |
| 5 | + file.managed: |
| 6 | + - name: {{ config_file }} |
| 7 | + - source: {{ haproxy.config_file_source }} |
| 8 | + - template: jinja |
| 9 | + - user: {{ haproxy.user }} |
| 10 | + - group: {{ haproxy.group }} |
| 11 | + - mode: 644 |
| 12 | + - require_in: |
| 13 | + - service: haproxy.service |
| 14 | + - watch_in: |
| 15 | + - service: haproxy.service |
| 16 | + {% if salt['pillar.get']('haproxy:overwrite', default=True) == False %} |
| 17 | + - unless: |
| 18 | + - test -e {{ config_file }} |
| 19 | + {% endif %} |
| 20 | +
|
| 21 | +{% if salt['pillar.get']('haproxy:global:chroot:enable', False) and |
| 22 | + salt['pillar.get']('haproxy:global:chroot:path', '') %} |
| 23 | +haproxy-chroot-directory: |
| 24 | + file.directory: |
| 25 | + - name: {{ salt['pillar.get']('haproxy:global:chroot:path') }} |
| 26 | + - user: {{ haproxy.user }} |
| 27 | + - group: {{ haproxy.group }} |
| 28 | + - dir_mode: 755 |
| 29 | + - require_in: |
| 30 | + - service: haproxy.service |
| 31 | +{% endif %} |
0 commit comments