Remove Ollama server infrastructure and related tasks

This commit is contained in:
Fabio Scotto di Santolo
2026-04-22 10:46:14 +02:00
parent a32eb56721
commit fa94a2e70e
7 changed files with 5 additions and 85 deletions

View File

@@ -55,7 +55,6 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation
- `profile_desktop_common` owns the shared desktop bootstrap.
- `.emacs.d` is deployed by a dedicated `profile_desktop_common` task tagged `emacs`.
- User services are managed by `turnstile` and live under `dotfiles/desktop/.config/service/`.
- `desktop_ollama_enabled` controls whether the user `ollama` service is present; default is `false` and hosts can override it in `host_vars`.
- `ssh-agent` runs under `turnstile` with stable socket `~/.local/state/ssh-agent/socket`.
- Critical session entrypoints:
- `dotfiles/desktop/.xinitrc`

View File

@@ -87,8 +87,7 @@ Lo stato attuale del profilo desktop include, tra le altre cose:
- pacchetti Void Linux e servizi runit
- `turnstile` per i servizi utente, inclusi `emacs` e `ssh-agent`
- `ssh-agent` con socket stabile condiviso tra shell, SSH ed Emacs in `~/.local/state/ssh-agent/socket`
- `.emacs.d` distribuito da un task dedicato Ansible con tag `emacs`
- `ollama` eseguito via container Podman, con servizio utente controllato da `desktop_ollama_enabled` (default `false`)
- `.emacs.d` distribuito da un task dedicato Ansible con tag `emacs`
- `tmux` con plugin gestiti da TPM al bootstrap del profilo desktop
- Flatpak con remoto Flathub
- GNOME Keyring e bootstrap della posta via script dedicato

View File

@@ -8,7 +8,6 @@ desktop_default_session: i3
desktop_default_session_env: xorg
desktop_restart_emptty_automatically: false
desktop_emptty_session_error_logging: disabled
desktop_ollama_enabled: false
desktop_common_packages:
- brightnessctl
@@ -146,12 +145,7 @@ desktop_source_tools:
install_name: rust-script
build_output_path: target/release/rust-script
desktop_binary_tools:
- name: ollama
install_name: ollama
repo: https://github.com/ollama/ollama
asset_arch: amd64
install_mode: tree
desktop_binary_tools: []
desktop_npm_packages:
- name: "opencode-ai"

View File

@@ -71,6 +71,4 @@
| unique
}}
state: present
update_cache: false
update_cache: false

View File

@@ -13,18 +13,8 @@
- name: Set effective version for {{ binary_tool.name }}
ansible.builtin.set_fact:
binary_tool_version: >-
{{
ollama_version
if binary_tool.name == 'ollama'
else binary_tool.version | default('')
}}
binary_tool_asset_name: >-
{{
ollama_asset_name.name
if binary_tool.name == 'ollama'
else binary_tool.asset_name
}}
binary_tool_version: "{{ binary_tool.version | default('') }}"
binary_tool_asset_name: "{{ binary_tool.asset_name }}"
- name: Ensure extraction directory exists for {{ binary_tool.name }}
ansible.builtin.file:

View File

@@ -264,13 +264,6 @@
loop_control:
label: "{{ item.dest }}"
- name: Remove disabled ollama user service
tags: [dotfiles, dotfiles:desktop, services]
ansible.builtin.file:
path: "{{ user_home }}/.config/service/ollama"
state: absent
when: not (desktop_ollama_enabled | default(false) | bool)
- name: Copy Emacs desktop dotfiles
tags: [dotfiles, dotfiles:desktop, emacs]
ansible.builtin.copy:
@@ -476,42 +469,6 @@
ansible.builtin.set_fact:
desktop_tools_tmp_dir: /tmp/desktop-tools
- name: Set ollama tool config from list
tags: [packages]
ansible.builtin.set_fact:
desktop_ollama_tool: >-
{{
desktop_binary_tools
| selectattr('name', 'equalto', 'ollama')
| first
| default({})
}}
when: "'ollama' in (desktop_binary_tools | map(attribute='name') | list)"
- name: Fetch latest ollama release metadata
tags: [packages]
ansible.builtin.uri:
url: https://api.github.com/repos/ollama/ollama/releases/latest
headers:
Accept: application/vnd.github+json
return_content: true
register: ollama_latest_release
changed_when: false
when: "'ollama' in (desktop_binary_tools | map(attribute='name') | list)"
- name: Set ollama release metadata
tags: [packages]
ansible.builtin.set_fact:
ollama_version: "{{ ollama_latest_release.json.tag_name | regex_replace('^v') }}"
ollama_asset_name: >-
{{
ollama_latest_release.json.assets
| selectattr('name', 'equalto', 'ollama-linux-' ~ desktop_ollama_tool.asset_arch ~ '.tar.zst')
| first
| default({})
}}
when: "'ollama' in (desktop_binary_tools | map(attribute='name') | list)"
- name: Ensure temporary directory exists for desktop binary tools
tags: [packages]
ansible.builtin.file:
@@ -519,14 +476,6 @@
state: directory
mode: "0755"
- name: Fetch latest ollama release archive
tags: [packages]
ansible.builtin.get_url:
url: "https://github.com/ollama/ollama/releases/download/v{{ ollama_version }}/{{ ollama_asset_name.name }}"
dest: "{{ desktop_tools_tmp_dir }}/{{ ollama_asset_name.name }}"
mode: "0644"
when: "'ollama' in (desktop_binary_tools | map(attribute='name') | list)"
- name: Install desktop binary tools
tags: [packages]
ansible.builtin.include_tasks:

View File

@@ -1,9 +0,0 @@
#!/bin/sh
set -eu
if [ -n "${TURNSTILE_ENV_DIR:-}" ]; then
exec chpst -e "$TURNSTILE_ENV_DIR" /usr/local/bin/ollama serve
fi
exec /usr/local/bin/ollama serve