Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions autobot-slm-backend/ansible/roles/backend/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ backend_llm_provider: "ollama" # Default LLM provider for all agents
backend_llm_endpoint: "http://127.0.0.1:11434" # Default Ollama endpoint
backend_llm_model: "qwen3.5:9b" # Default LLM model

# AI Stack connection (co-located: use 127.0.0.1; WSL2: may need 10.255.255.254)
backend_ai_stack_host: "127.0.0.1"
backend_ai_stack_port: 8080

# Service Authentication
service_auth_service_id: "main-backend"
service_auth_keys_dir: "/etc/autobot/service-keys"
Expand Down
22 changes: 22 additions & 0 deletions autobot-slm-backend/ansible/roles/backend/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,28 @@
state: present
tags: ['backend', 'users']

# ==========================================================
# WSL2 auto-detection (#3503): 127.0.0.1 is ECONNREFUSED on
# WSL2 mirrored networking — override backend_ai_stack_host
# per-host at deploy time if it has not been explicitly set.
# ==========================================================
- name: "Backend | Read /proc/version to detect WSL2 (#3503)"
ansible.builtin.slurp:
src: /proc/version
register: _proc_version
changed_when: false
failed_when: false
tags: ['backend', 'config']

- name: "Backend | Set backend_ai_stack_host=10.255.255.254 on WSL2 hosts (#3503)"
ansible.builtin.set_fact:
backend_ai_stack_host: "10.255.255.254"
when:
- _proc_version.content is defined
- (_proc_version.content | b64decode | lower) is search('microsoft')
- backend_ai_stack_host == '127.0.0.1'
tags: ['backend', 'config']

# ============================================================
# Per-role env at /etc/autobot/ (#926 Phase 4)
# ============================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ AUTOBOT_SLM_TLS_ENABLED=true
AUTOBOT_TTS_WORKER_HOST={{ tts_host | default('127.0.0.1') }}
AUTOBOT_TTS_WORKER_PORT={{ tts_port | default(8083) }}

# AI Stack (agent processing service)
AUTOBOT_AI_STACK_HOST={{ backend_ai_stack_host }}
AUTOBOT_AI_STACK_PORT={{ backend_ai_stack_port }}

# ChromaDB (remote on AI Stack VM)
AUTOBOT_CHROMADB_HOST={{ backend_chromadb_host | default(ai_stack_host | default('127.0.0.1')) }}
AUTOBOT_CHROMADB_PORT={{ backend_chromadb_port | default('8100') }}
Expand Down
Loading