formula-fabio/fabio/config.sls

46 lines
1 KiB
Text
Raw Normal View History

2018-05-17 17:36:29 -04:00
{%- from slspath + '/map.jinja' import fabio with context -%}
2018-05-17 19:16:38 -04:00
{#
2018-05-17 17:36:29 -04:00
fabio-config:
file.serialize:
- name: /etc/fabio/config.json
- formatter: json
- dataset: {{ fabio.config }}
- user: {{ fabio.user }}
- group: {{ fabio.group }}
- mode: 0640
- require:
- user: fabio-user
{%- if fabio.service %}
- watch_in:
- service: fabio
{%- endif %}
{% for script in fabio.scripts %}
fabio-script-install-{{ loop.index }}:
file.managed:
- source: {{ script.source }}
- name: {{ script.name }}
- template: jinja
- context: {{ script.get('context', {}) | yaml }}
- user: {{ fabio.user }}
- group: {{ fabio.group }}
- mode: 0755
{% endfor %}
fabio-script-config:
file.serialize:
- name: /etc/fabio.d/services.json
{% if fabio.service != False %}
- watch_in:
- service: fabio
{% endif %}
- user: {{ fabio.user }}
- group: {{ fabio.group }}
- require:
- user: fabio-user
- formatter: json
- dataset:
services: {{ fabio.register }}
2018-05-17 19:16:38 -04:00
#}