Skip to content

fix(ansible): deploy.yml standalone redeploy installs python3.12 prerequisite (#3538)#3568

Merged
mrveiss merged 1 commit intoDev_new_guifrom
issue-3538
Apr 6, 2026
Merged

fix(ansible): deploy.yml standalone redeploy installs python3.12 prerequisite (#3538)#3568
mrveiss merged 1 commit intoDev_new_guifrom
issue-3538

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 6, 2026

Closes #3538

Root cause

deploy.yml lacked the python312 prerequisite step that provision-fleet-roles.yml has. Fresh hosts without Python 3.12 fail when the ai-stack role runs python3.12 -m venv (fixed in PR #3536).

Fix

Added a single task immediately before the AI/ML role block that runs include_role: name: python312 when ai-stack is in the role_list. The python312 role is idempotent — it checks python3.12 --version first and skips installation if already present.

Test plan

  • YAML syntax valid
  • Standalone redeploy to a fresh host with only Python 3.10 succeeds (python3.12 installed first)
  • Idempotent: safe to run on hosts that already have Python 3.12
  • Non-ai-stack deploys are unaffected (gated by when: "'ai-stack' in role_list")

…prerequisite (#3538)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mrveiss
Copy link
Copy Markdown
Owner Author

mrveiss commented Apr 6, 2026

Code review

Found 1 issue:

  1. backend role is excluded from the python312 prerequisite guard — issue bug(ansible): deploy.yml standalone redeploy skips python312 prerequisite — python3.12 not found on fresh hosts #3538 explicitly calls for an OR condition covering both ai-stack and backend, since both create Python 3.12 venvs. A standalone backend-only redeploy on a fresh host will still fail with python3.12: command not found.

# AI/ML Roles
# python312 must be present before ai-stack creates its venv (#3538)
- name: Install Python 3.12 prerequisite for ai-stack
ansible.builtin.include_role:
name: python312
when: "'ai-stack' in role_list"
- name: Deploy npu-worker role
ansible.builtin.include_role:
name: npu-worker
when: "'npu-worker' in role_list"

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@mrveiss mrveiss merged commit 1ba0ef4 into Dev_new_gui Apr 6, 2026
1 of 4 checks passed
@mrveiss mrveiss deleted the issue-3538 branch April 6, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant