Skip to content

bug(ansible): site.yml backend play unrunnable — references nonexistent roles and a dangling backend.env.j2 template #10048

Closed

Description

@mrveiss

Found during #10005 (template consolidation)

The Deploy Backend Services play in autobot-slm-backend/ansible/site.yml:53-59 cannot run:

  1. Nonexistent roles — the play lists python and fastapi_app; neither exists under ansible/roles/ (there is python312, no fastapi_app). Ansible fails at role resolution before any task executes.
  2. Dangling template — roles/backend_services/tasks/main.yml task "Generate environment configuration" uses src: backend.env.j2, but the role has no templates/ dir and no playbook-adjacent copy exists; the only backend.env.j2 lives in roles/backend/templates/ which is outside this role's template search path. The task would fail with "could not find or access".
  3. The role also duplicates the backend deploy with a divergent layout (/opt/autobot/app + /opt/autobot/venv vs the backend role's /opt/autobot/autobot-backend with in-tree venv) and syncs {{ playbook_dir }}/../ (the SLM backend tree) as the app code.

#10005 already redirected the role's systemd-unit task to the canonical roles/backend/templates/autobot-backend.service.j2, so the unit file is no longer a second source of truth. Remaining decision: either wire backend_services properly (fix role list, env template, venv layout) or retire the play in favour of the maintained roles/backend path used by the wizard playbooks.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions