36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
---
|
|
# ------------------------------------------------------------------------------
|
|
# FILE: ansible/playbooks/day1_deploy_ollama.yml
|
|
# DESCRIPTION: Deploys Ollama with ROCm GPU acceleration on astro-orbiter.
|
|
# Assumes day0_baseline.yml has already run (common role complete).
|
|
# PCIe passthrough for the RX 5700 must be configured in Proxmox
|
|
# and the GPU must be visible to the VM before running this playbook.
|
|
#
|
|
# Pre-flight check:
|
|
# ssh wed@astro-orbiter 'lspci | grep -i amd'
|
|
# Should show the RX 5700 before proceeding.
|
|
#
|
|
# Usage (from ansible/ directory):
|
|
# ansible-playbook playbooks/day1_deploy_ollama.yml
|
|
# ------------------------------------------------------------------------------
|
|
|
|
- name: Deploy Ollama with ROCm on astro-orbiter
|
|
hosts: astro-orbiter
|
|
become: true
|
|
|
|
pre_tasks:
|
|
- name: Verify AMD GPU is visible to the VM
|
|
command: lspci
|
|
register: lspci_output
|
|
changed_when: false
|
|
|
|
- name: Fail if no AMD GPU detected
|
|
fail:
|
|
msg: >
|
|
No AMD GPU detected via lspci. Verify PCIe passthrough is configured
|
|
in Proxmox and the RX 5700 is visible to the VM before proceeding.
|
|
when: "'AMD' not in lspci_output.stdout and 'Radeon' not in lspci_output.stdout"
|
|
|
|
roles:
|
|
- ollama
|