--- # ------------------------------------------------------------------------------ # FILE: roles/llm-inference/tasks/vllm.yml # DESCRIPTION: Phase 3 — Python venv + vLLM install. # Idempotent: venv creation and pip install only run if the # venv binary or vllm package is absent. # Already completed manually on 2026-08-03 — will no-op. # ------------------------------------------------------------------------------ - name: Create Python venv for vLLM ansible.builtin.command: cmd: python3 -m venv {{ llm_venv_path }} creates: "{{ llm_venv_path }}/bin/python" become: true become_user: "{{ llm_venv_owner }}" - name: Upgrade pip inside venv ansible.builtin.pip: name: pip state: latest virtualenv: "{{ llm_venv_path }}" become: true become_user: "{{ llm_venv_owner }}" - name: Install vLLM and bitsandbytes ansible.builtin.pip: name: - vllm - bitsandbytes state: present virtualenv: "{{ llm_venv_path }}" become: true become_user: "{{ llm_venv_owner }}" - name: Verify vLLM is importable ansible.builtin.command: cmd: "{{ llm_venv_path }}/bin/python -c 'import vllm; print(vllm.__version__)'" register: vllm_version changed_when: false - name: Print vLLM version ansible.builtin.debug: msg: "vLLM version: {{ vllm_version.stdout }}"