mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
Remove Ollama server infrastructure and related tasks
This commit is contained in:
@@ -55,7 +55,6 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation
|
|||||||
- `profile_desktop_common` owns the shared desktop bootstrap.
|
- `profile_desktop_common` owns the shared desktop bootstrap.
|
||||||
- `.emacs.d` is deployed by a dedicated `profile_desktop_common` task tagged `emacs`.
|
- `.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/`.
|
- 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`.
|
- `ssh-agent` runs under `turnstile` with stable socket `~/.local/state/ssh-agent/socket`.
|
||||||
- Critical session entrypoints:
|
- Critical session entrypoints:
|
||||||
- `dotfiles/desktop/.xinitrc`
|
- `dotfiles/desktop/.xinitrc`
|
||||||
|
|||||||
@@ -87,8 +87,7 @@ Lo stato attuale del profilo desktop include, tra le altre cose:
|
|||||||
- pacchetti Void Linux e servizi runit
|
- pacchetti Void Linux e servizi runit
|
||||||
- `turnstile` per i servizi utente, inclusi `emacs` e `ssh-agent`
|
- `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`
|
- `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`
|
- `.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`)
|
|
||||||
- `tmux` con plugin gestiti da TPM al bootstrap del profilo desktop
|
- `tmux` con plugin gestiti da TPM al bootstrap del profilo desktop
|
||||||
- Flatpak con remoto Flathub
|
- Flatpak con remoto Flathub
|
||||||
- GNOME Keyring e bootstrap della posta via script dedicato
|
- GNOME Keyring e bootstrap della posta via script dedicato
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ desktop_default_session: i3
|
|||||||
desktop_default_session_env: xorg
|
desktop_default_session_env: xorg
|
||||||
desktop_restart_emptty_automatically: false
|
desktop_restart_emptty_automatically: false
|
||||||
desktop_emptty_session_error_logging: disabled
|
desktop_emptty_session_error_logging: disabled
|
||||||
desktop_ollama_enabled: false
|
|
||||||
|
|
||||||
desktop_common_packages:
|
desktop_common_packages:
|
||||||
- brightnessctl
|
- brightnessctl
|
||||||
@@ -146,12 +145,7 @@ desktop_source_tools:
|
|||||||
install_name: rust-script
|
install_name: rust-script
|
||||||
build_output_path: target/release/rust-script
|
build_output_path: target/release/rust-script
|
||||||
|
|
||||||
desktop_binary_tools:
|
desktop_binary_tools: []
|
||||||
- name: ollama
|
|
||||||
install_name: ollama
|
|
||||||
repo: https://github.com/ollama/ollama
|
|
||||||
asset_arch: amd64
|
|
||||||
install_mode: tree
|
|
||||||
|
|
||||||
desktop_npm_packages:
|
desktop_npm_packages:
|
||||||
- name: "opencode-ai"
|
- name: "opencode-ai"
|
||||||
|
|||||||
@@ -71,6 +71,4 @@
|
|||||||
| unique
|
| unique
|
||||||
}}
|
}}
|
||||||
state: present
|
state: present
|
||||||
update_cache: false
|
update_cache: false
|
||||||
|
|
||||||
|
|
||||||
@@ -13,18 +13,8 @@
|
|||||||
|
|
||||||
- name: Set effective version for {{ binary_tool.name }}
|
- name: Set effective version for {{ binary_tool.name }}
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
binary_tool_version: >-
|
binary_tool_version: "{{ binary_tool.version | default('') }}"
|
||||||
{{
|
binary_tool_asset_name: "{{ binary_tool.asset_name }}"
|
||||||
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
|
|
||||||
}}
|
|
||||||
|
|
||||||
- name: Ensure extraction directory exists for {{ binary_tool.name }}
|
- name: Ensure extraction directory exists for {{ binary_tool.name }}
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|||||||
@@ -264,13 +264,6 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.dest }}"
|
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
|
- name: Copy Emacs desktop dotfiles
|
||||||
tags: [dotfiles, dotfiles:desktop, emacs]
|
tags: [dotfiles, dotfiles:desktop, emacs]
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -476,42 +469,6 @@
|
|||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
desktop_tools_tmp_dir: /tmp/desktop-tools
|
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
|
- name: Ensure temporary directory exists for desktop binary tools
|
||||||
tags: [packages]
|
tags: [packages]
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -519,14 +476,6 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: "0755"
|
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
|
- name: Install desktop binary tools
|
||||||
tags: [packages]
|
tags: [packages]
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.include_tasks:
|
||||||
|
|||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user