---
- include_tasks: utils/once/flag.yml
- name: "๐ Stage the MCP adapter instance for {{ application_id }}"
ansible.builtin.include_tasks: "{{ lookup('path_absolute', 'roles/svc-ai-mcp-adapter/tasks/instance.yml') }}"
vars:
mcp_adapter_instance_dir: "{{ LIBRETRANSLATE_MCP_INSTANCE_DIR }}"
when: LIBRETRANSLATE_MCP_ENABLED | bool
- name: "๐งฉ load docker, db and proxy for {{ application_id }}"
include_role:
name: sys-stk-full
- name: "๐ฆ Stage the model prefetch of {{ application_id }}"
stack_host_copy:
src: python/prefetch_models.py
dest: "{{ [lookup('container', application_id, 'directories.instance'), 'prefetch_models.py'] | path_join }}"
mode: "0644"
notify:
- compose-build
- compose-up
- name: "๐ Stage the package-cache CA into the build context of {{ application_id }}"
stack_host_copy:
content: "{{ lookup('file', LIBRETRANSLATE_CACHE_CA_FILE) if LIBRETRANSLATE_CACHE_CA_FILE is file else '' }}"
dest: "{{ [lookup('container', application_id, 'directories.instance'), 'package-frontend-ca.crt'] | path_join }}"
mode: "0644"
notify:
- compose-build
- compose-up
- name: "๐ Stage the package-cache CA installer of {{ application_id }}"
stack_host_copy:
src: "{{ lookup('path_absolute', LIBRETRANSLATE_CACHE_CA_INSTALLER) }}"
dest: "{{ [lookup('container', application_id, 'directories.instance'), 'package-frontend-ca.sh'] | path_join }}"
mode: "0755"
notify:
- compose-build
- compose-up
- name: "๐งฑ Rebuild the MCP adapter of {{ application_id }}"
ansible.builtin.include_tasks: "{{ lookup('path_absolute', 'roles/svc-ai-mcp-adapter/tasks/rebuild.yml') }}"
when: LIBRETRANSLATE_MCP_ENABLED | bool
- name: "๐ฟ Flush compose handlers for {{ application_id }}"
ansible.builtin.meta: flush_handlers
- name: "๐ฎ Verify the GPU reached {{ application_id }}"
ansible.builtin.include_tasks: utils/assert_gpu.yml
when:
- IS_STACK_HOST | bool
- LIBRETRANSLATE_GPU | bool