1 # -*- coding: utf-8 -*-
4 {#- Get the `tplroot` from `tpldir` #}
5 {%- set tplroot = tpldir.split('/')[0] %}
6 {%- set sls_config_file = tplroot ~ '.config.file' %}
7 {%- from tplroot ~ "/map.jinja" import arvados with context %}
8 {%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
12 - {{ sls_config_file }}
15 {%- if arvados.dispatcher.pkg.name == 'crunch-dispatch-local' %}
16 arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-credentials:
18 - name: /etc/arvados/crunch-dispatch-local-credentials
19 - source: {{ files_switch(['crunch-dispatch-local-credentials.tmpl'],
20 lookup='arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-credentials',
30 arvados: {{ arvados | json }}
32 - pkg: arvados-dispatcher-package-install-pkg-installed
34 arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-service:
36 - name: /etc/systemd/system/crunch-dispatch-local.service
37 - source: {{ files_switch(['crunch-dispatch-local-service.tmpl'],
38 lookup='arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-service',
48 arvados: {{ arvados | json }}
50 - file: arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-credentials
51 - pkg: arvados-dispatcher-package-install-pkg-installed
53 - name: systemctl daemon-reload
55 - service: arvados-dispatcher-service-running-service-running
57 - file: arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-service