00_core.ymlΒΆ

---
- include_tasks: utils/once/flag.yml

- name: "⬇️ Seed the shared model store before the daemons index it"
  ansible.builtin.include_tasks:
    file: utils/preseed.yml
    apply:
      delegate_to: "{{ LMSTUDIO_NFS_SERVER }}"
      run_once: true
  when: LMSTUDIO_PRESEED_ENABLED | bool

- name: "πŸ₯Ύ Bootstrap the compose host once before staging the build context"
  ansible.builtin.include_role:
    name: sys-svc-compose
    tasks_from: 00_core.yml
  when: run_once_sys_svc_compose is not defined

- name: "πŸ“ Create the build context of '{{ application_id }}'"
  ansible.builtin.file:
    path: "{{ LMSTUDIO_BUILD_DIR }}"
    state: directory
    mode: "0755"
  when: IS_STACK_HOST | bool

- name: "🎬 Stage the build scripts into the build context of '{{ application_id }}'"
  stack_host_copy:
    src: "shell/{{ item }}"
    dest: "{{ [LMSTUDIO_BUILD_DIR, item] | path_join }}"
    mode: "0755"
  loop:
    - daemon-run.sh
    - install.sh
  notify:
    - compose-build
    - compose-up

- name: "πŸ”§ Setup container network for {{ application_id }}"
  include_tasks: "{{ lookup('path_absolute', 'roles/sys-svc-compose/tasks/utils/network/routine.yml') }}"
  vars:
    compose_handlers_flush: true

- name: "⬇️ Manager-side model pre-pull on the hosting node"
  ansible.builtin.include_tasks: 01_manager_ops.yml
  when: IS_STACK_HOST | bool