added ollama role and host

This commit is contained in:
2026-08-05 11:21:54 +02:00
parent 25593dafa0
commit 6a3a1020db
12 changed files with 171 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
---
# tasks file for roles/ollama
# Modellverwaltung: Es werden nur Modelle heruntergeladen, die noch nicht vorhanden sind.
- name: ollama | models | list installed models
tags: ollama,models
ansible.builtin.command: ollama list
register: ollama_installed_models
changed_when: false
# Kurzes Warten auf den frisch gestarteten Daemon beim Erstlauf (Retry-Muster wie omada-controller).
retries: 5
until: ollama_installed_models is success
delay: 2
- name: ollama | models | pull missing models
tags: ollama,models
ansible.builtin.command: ollama pull {{ item }}
loop: "{{ ollama_models }}"
# 'ollama list' führt die Modellnamen in der ersten Spalte auf; ein bereits
# vorhandenes Modell wird nicht erneut heruntergeladen.
when: item not in ollama_installed_models.stdout