From fa94a2e70e1c9bfe128bacc7cf3e2076e6196807 Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Wed, 22 Apr 2026 10:46:14 +0200 Subject: [PATCH] Remove Ollama server infrastructure and related tasks --- AGENTS.md | 1 - README.md | 3 +- ansible/inventory/group_vars/desktop.yml | 8 +-- ansible/roles/packages_void/tasks/main.yml | 4 +- .../tasks/binary_tool.yml | 14 +---- .../profile_desktop_common/tasks/main.yml | 51 ------------------- dotfiles/desktop/.config/service/ollama/run | 9 ---- 7 files changed, 5 insertions(+), 85 deletions(-) delete mode 100755 dotfiles/desktop/.config/service/ollama/run diff --git a/AGENTS.md b/AGENTS.md index 3ad5402..2348270 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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` diff --git a/README.md b/README.md index 2a22746..90319e8 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/ansible/inventory/group_vars/desktop.yml b/ansible/inventory/group_vars/desktop.yml index 80aec64..c5b0ab0 100644 --- a/ansible/inventory/group_vars/desktop.yml +++ b/ansible/inventory/group_vars/desktop.yml @@ -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" diff --git a/ansible/roles/packages_void/tasks/main.yml b/ansible/roles/packages_void/tasks/main.yml index 12874e6..d551070 100644 --- a/ansible/roles/packages_void/tasks/main.yml +++ b/ansible/roles/packages_void/tasks/main.yml @@ -71,6 +71,4 @@ | unique }} state: present - update_cache: false - - + update_cache: false \ No newline at end of file diff --git a/ansible/roles/profile_desktop_common/tasks/binary_tool.yml b/ansible/roles/profile_desktop_common/tasks/binary_tool.yml index 7587f13..5c04b3c 100644 --- a/ansible/roles/profile_desktop_common/tasks/binary_tool.yml +++ b/ansible/roles/profile_desktop_common/tasks/binary_tool.yml @@ -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: diff --git a/ansible/roles/profile_desktop_common/tasks/main.yml b/ansible/roles/profile_desktop_common/tasks/main.yml index 34a8a79..c283e5e 100644 --- a/ansible/roles/profile_desktop_common/tasks/main.yml +++ b/ansible/roles/profile_desktop_common/tasks/main.yml @@ -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: diff --git a/dotfiles/desktop/.config/service/ollama/run b/dotfiles/desktop/.config/service/ollama/run deleted file mode 100755 index 51d5f01..0000000 --- a/dotfiles/desktop/.config/service/ollama/run +++ /dev/null @@ -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