mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
Stop managing Ollama through turnstile
This commit is contained in:
@@ -54,7 +54,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.
|
||||||
- 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/`.
|
||||||
- `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`.
|
||||||
- `ollama` is installed from the upstream Linux tarball into `/usr/local` and runs under `turnstile`.
|
|
||||||
- Critical session entrypoints:
|
- Critical session entrypoints:
|
||||||
- `dotfiles/desktop/.xinitrc`
|
- `dotfiles/desktop/.xinitrc`
|
||||||
- `dotfiles/desktop/.local/bin/start-sway-session`
|
- `dotfiles/desktop/.local/bin/start-sway-session`
|
||||||
|
|||||||
@@ -85,9 +85,9 @@ Lo stato attuale del profilo desktop include, tra le altre cose:
|
|||||||
- sessione i3 su tutti i desktop Void e sessione Sway opzionale su `nymph`
|
- sessione i3 su tutti i desktop Void e sessione Sway opzionale su `nymph`
|
||||||
- `emptty` con scelta sessione a login su `nymph` e default host-specific sugli altri desktop
|
- `emptty` con scelta sessione a login su `nymph` e default host-specific sugli altri desktop
|
||||||
- pacchetti Void Linux e servizi runit
|
- pacchetti Void Linux e servizi runit
|
||||||
- `turnstile` per i servizi utente, inclusi `emacs`, `ssh-agent` e `ollama`
|
- `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`
|
||||||
- `ollama` installato da tarball upstream e gestito come servizio utente `turnstile`
|
- `ollama` eseguito via container Podman
|
||||||
- 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
|
||||||
- `Waybar` per Sway con `style.css` condiviso
|
- `Waybar` per Sway con `style.css` condiviso
|
||||||
|
|||||||
@@ -382,12 +382,6 @@
|
|||||||
desktop_tools_tmp_dir: /tmp/desktop-tools
|
desktop_tools_tmp_dir: /tmp/desktop-tools
|
||||||
st_repo: https://codeberg.org/fscotto/st
|
st_repo: https://codeberg.org/fscotto/st
|
||||||
st_src_dir: "{{ user_home }}/.local/src/st"
|
st_src_dir: "{{ user_home }}/.local/src/st"
|
||||||
ollama_asset: >-
|
|
||||||
{{
|
|
||||||
'ollama-linux-amd64.tar.zst' if ansible_facts['architecture'] == 'x86_64'
|
|
||||||
else 'ollama-linux-arm64.tar.zst' if ansible_facts['architecture'] in ['aarch64', 'arm64']
|
|
||||||
else ''
|
|
||||||
}}
|
|
||||||
gitmux_version: v0.11.5
|
gitmux_version: v0.11.5
|
||||||
opencode_asset_name: >-
|
opencode_asset_name: >-
|
||||||
{{
|
{{
|
||||||
@@ -407,12 +401,6 @@
|
|||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
gitmux_asset: "gitmux_{{ gitmux_version }}_linux_{{ gitmux_arch }}.tar.gz"
|
gitmux_asset: "gitmux_{{ gitmux_version }}_linux_{{ gitmux_arch }}.tar.gz"
|
||||||
|
|
||||||
- name: Ensure architecture is supported for Ollama binary
|
|
||||||
tags: [packages]
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: "Unsupported architecture {{ ansible_facts['architecture'] }} for Ollama release binary"
|
|
||||||
when: ollama_asset == ''
|
|
||||||
|
|
||||||
- name: Ensure architecture is supported for OpenCode binary
|
- name: Ensure architecture is supported for OpenCode binary
|
||||||
tags: [packages]
|
tags: [packages]
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
@@ -540,36 +528,3 @@
|
|||||||
cmd: make clean
|
cmd: make clean
|
||||||
chdir: "{{ st_src_dir }}"
|
chdir: "{{ st_src_dir }}"
|
||||||
when: st_repo_state.changed or not st_binary.stat.exists
|
when: st_repo_state.changed or not st_binary.stat.exists
|
||||||
|
|
||||||
- name: Download Ollama release archive
|
|
||||||
tags: [packages]
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: "https://ollama.com/download/{{ ollama_asset }}"
|
|
||||||
dest: "{{ desktop_tools_tmp_dir }}/{{ ollama_asset }}"
|
|
||||||
mode: "0644"
|
|
||||||
register: ollama_archive_download
|
|
||||||
|
|
||||||
- name: Check whether Ollama is already installed
|
|
||||||
tags: [packages]
|
|
||||||
ansible.builtin.stat:
|
|
||||||
path: /usr/local/bin/ollama
|
|
||||||
register: ollama_install_state
|
|
||||||
|
|
||||||
- name: Remove previous Ollama install paths when required
|
|
||||||
tags: [packages]
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: /usr/local/lib/ollama
|
|
||||||
state: absent
|
|
||||||
when:
|
|
||||||
- ollama_archive_download.changed or not ollama_install_state.stat.exists
|
|
||||||
|
|
||||||
- name: Extract Ollama release archive into /usr/local
|
|
||||||
tags: [packages]
|
|
||||||
ansible.builtin.shell: >-
|
|
||||||
zstd -d -c "{{ desktop_tools_tmp_dir }}/{{ ollama_asset }}" |
|
|
||||||
tar -xf - -C /usr/local
|
|
||||||
args:
|
|
||||||
executable: /bin/sh
|
|
||||||
changed_when: true
|
|
||||||
when:
|
|
||||||
- ollama_archive_download.changed or not ollama_install_state.stat.exists
|
|
||||||
|
|||||||
@@ -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