--- # ------------------------------------------------------------------------------ # FILE: roles/llm-inference/tasks/integration.yml # DESCRIPTION: Phase 6 — Wire astro-orbiter into Hermes as a secondary provider. # Writes a provider config fragment to carousel-of-progress # (the Hermes host) so FRIDAY crons can route to the local model. # # Hermes provider config lives at ~/.hermes/config.yaml on carousel. # This task uses the lineinfile/blockinfile approach to add the provider # entry idempotently without clobbering the existing config. # # NOTE: Hermes must be restarted on carousel after this task runs. # Manual step — JARVIS will notify Ryan. # ------------------------------------------------------------------------------ - name: Check if astro-orbiter provider already configured in Hermes ansible.builtin.command: cmd: grep -c "astro-orbiter" /home/wed/.hermes/config.yaml register: provider_check changed_when: false failed_when: false delegate_to: carousel-of-progress - name: Add astro-orbiter as Hermes secondary provider ansible.builtin.blockinfile: path: /home/wed/.hermes/config.yaml marker: "# {mark} ANSIBLE MANAGED — astro-orbiter vLLM provider" insertafter: "^providers:" block: | # astro-orbiter — local RTX 3090 vLLM inference - name: astro-orbiter type: openai-compatible base_url: http://{{ hostvars['astro-orbiter']['ansible_host'] }}:{{ llm_serve_port }}/v1 model: {{ llm_hf_model }} api_key: none when: provider_check.stdout == "0" delegate_to: carousel-of-progress notify: restart hermes - name: Remind operator to restart Hermes on carousel ansible.builtin.debug: msg: > Phase 6 complete. Hermes on carousel-of-progress has been updated. Restart Hermes manually or via: systemctl --user restart hermes-gateway hermes-dashboard