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-run-sh:
18 - name: /usr/local/bin/crunch-run.sh
19 - source: {{ files_switch(['crunch-run-sh.tmpl'],
20 lookup='arvados-dispatcher-service-file-file-managed-crunch-run-sh',
29 arvados: {{ arvados | json }}
31 - pkg: arvados-dispatcher-package-install-pkg-installed
33 arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-credentials:
35 - name: /etc/arvados/crunch-dispatch-local-credentials
36 - source: {{ files_switch(['crunch-dispatch-local-credentials.tmpl'],
37 lookup='arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-credentials',
47 arvados: {{ arvados | json }}
49 - pkg: arvados-dispatcher-package-install-pkg-installed
51 arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-service:
53 - name: /etc/systemd/system/crunch-dispatch-local.service
54 - source: {{ files_switch(['crunch-dispatch-local-service.tmpl'],
55 lookup='arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-service',
65 arvados: {{ arvados | json }}
67 - file: arvados-dispatcher-service-file-file-managed-crunch-run-sh
68 - file: arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-credentials
69 - pkg: arvados-dispatcher-package-install-pkg-installed
71 - name: systemctl daemon-reload
73 - service: arvados-dispatcher-service-running-service-running
75 - file: arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-service
77 - file: arvados-dispatcher-service-file-file-managed-crunch-dispatch-local-service