zeroclaw, continue attempting to automate the process, don't have good enough reception to successfully download yet.
This commit is contained in:
@@ -11,6 +11,12 @@
|
|||||||
# Individual Guides
|
# Individual Guides
|
||||||
# - https://github.com/zeroclaw-labs/zeroclaw
|
# - https://github.com/zeroclaw-labs/zeroclaw
|
||||||
# - https://wiki.archlinux.org/title/Ollama
|
# - https://wiki.archlinux.org/title/Ollama
|
||||||
|
#
|
||||||
|
# Model Explanations
|
||||||
|
# - https://webscraft.org/blog/ollama-na-8-gb-ram-yaki-modeli-pratsyuyut-u-2026?lang=en
|
||||||
|
#
|
||||||
|
# Models
|
||||||
|
# - https://ollama.com/search
|
||||||
|
|
||||||
# Currently only testing this on Arch based distros (pacman).
|
# Currently only testing this on Arch based distros (pacman).
|
||||||
- name: Workstation | Linux | Software | ZeroClaw
|
- name: Workstation | Linux | Software | ZeroClaw
|
||||||
@@ -20,43 +26,122 @@
|
|||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
zeroclaw: zeroclaw
|
zeroclaw: zeroclaw
|
||||||
ollama: ollama
|
ollama: ollama
|
||||||
|
llm_installs:
|
||||||
|
- qwen3.5:4b
|
||||||
|
#- deepseek-r1:1.5b
|
||||||
|
#- deepseek-r1:7b
|
||||||
|
#- mistal:7b
|
||||||
|
#- ministral:3b
|
||||||
|
#- ministral:8b
|
||||||
|
#- mistal:7b
|
||||||
|
#- glm4-flash
|
||||||
|
#- qwen3.5:4b
|
||||||
|
#- qwen3:4b # most similar to Ask Brave
|
||||||
|
llm_removals:
|
||||||
|
- qwen2.5
|
||||||
|
|
||||||
# 1. Install
|
- name: Workstation | Linux | Software | ZeroClaw | Facts 02
|
||||||
- name: Workstation | Linux | Software | ZeroClaw | 01 | Install
|
ansible.builtin.set_fact:
|
||||||
|
ollama_runit_dir: "{{ runit_service_dir }}/{{ ollama }}"
|
||||||
|
zeroclaw_runit_dir: "{{ runit_service_dir }}/{{ zeroclaw }}"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | ZeroClaw | Facts 03
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
ollama_runit_start: "{{ ollama_runit_dir }}/{{ runit_service_script }}"
|
||||||
|
zeroclaw_runit_start: "{{ zeroclaw_runit_dir }}{{ runit_service_script }}n"
|
||||||
|
|
||||||
|
### TBD/TODO: Add to Env! (bash_profile, zprofile)
|
||||||
|
### OLLAMA_MAX_LOADED_MODELS=1
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | ZeroClaw | Install
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name:
|
name:
|
||||||
- "{{ zeroclaw }}"
|
- "{{ zeroclaw }}"
|
||||||
- "{{ ollama }}"
|
- "{{ ollama }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | ZeroClaw | 02 | Pull Model
|
#- name: Workstation | Linux | Software | ZeroClaw | ollama | Script [runit]
|
||||||
ansible.builtin.debug:
|
# ansible.builtin.shell: "{{ item }}"
|
||||||
msg: TBD
|
# loop:
|
||||||
### ollama serve & # start Ollama server
|
# - "mkdir -p {{ ollama_runit_dir }}"
|
||||||
### ollama pull llama3.2 # ~2GB, or a smaller model for less RAM
|
# - "echo '#!/bin/sh' > {{ ollama_runit_start }}"
|
||||||
|
# - "echo 'ollama serve' >> {{ ollama_runit_start }}"
|
||||||
|
# - "chmod +x {{ ollama_runit_start }}"
|
||||||
|
# register: shell_check
|
||||||
|
# changed_when: shell_check.rc == 0
|
||||||
|
# when: ansible_service_mgr == "runit"
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | ZeroClaw | 03 | Config
|
## This is safe to run without wasting too many resources, allows pulling.
|
||||||
|
#- name: Workstation | Linux | Software | ZeroClaw | ollama | Enable
|
||||||
|
# ansible.builtin.service:
|
||||||
|
# name: "{{ ollama }}"
|
||||||
|
# state: started
|
||||||
|
# enabled: true
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | ZeroClaw | ollama | Enable
|
||||||
|
ansible.builtin.blockinfile:
|
||||||
|
path: "{{ user_user.home }}/.config/i3/config"
|
||||||
|
marker: "# {mark} MANAGED BY ANSIBLE | zeroclaw"
|
||||||
|
block: |
|
||||||
|
exec --no-startup-id pgrep -x ollama || ollama serve >~/Reports/{{ ansible_hostname }}.ollama.log 2>&1
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | ZeroClaw | Models | Install
|
||||||
|
ansible.builtin.shell: |
|
||||||
|
set -o pipefail
|
||||||
|
item='{{ item }}'
|
||||||
|
if ollama list | grep -q $item; then
|
||||||
|
echo "OKAY" &&
|
||||||
|
return
|
||||||
|
else
|
||||||
|
ollama pull $item &&
|
||||||
|
echo "INSTALLED" &&
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo "FAILED"
|
||||||
|
loop: "{{ llm_installs }}"
|
||||||
|
register: shell_check
|
||||||
|
changed_when: "'INSTALLED' in shell_check.stdout"
|
||||||
|
failed_when: "'FAILED' in shell_check.stdout"
|
||||||
|
become: true
|
||||||
|
become_user: "{{ user }}"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | ZeroClaw | Models | Remove
|
||||||
|
ansible.builtin.shell: |
|
||||||
|
set -o pipefail
|
||||||
|
item='{{ item }}'
|
||||||
|
if ollama list | grep -q $item; then
|
||||||
|
ollama rm $item &&
|
||||||
|
echo "INSTALLED" &&
|
||||||
|
return
|
||||||
|
else
|
||||||
|
echo "OKAY" &&
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo "FAILED"
|
||||||
|
loop: "{{ llm_removals }}"
|
||||||
|
register: shell_check
|
||||||
|
changed_when: "'INSTALLED' in shell_check.stdout"
|
||||||
|
failed_when: "'FAILED' in shell_check.stdout"
|
||||||
|
become: true
|
||||||
|
become_user: "{{ user }}"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | ZeroClaw | Config
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: TBD
|
msg: TBD
|
||||||
### ~/.zeroclaw/config.toml`
|
### ~/.zeroclaw/config.toml`
|
||||||
### `default_provider = "ollama"` pointing at `http://127.0.0.1:11434`
|
### `default_provider = "ollama"` pointing at `http://127.0.0.1:11434`
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | ZeroClaw | 04 | Test
|
- name: Workstation | Linux | Software | ZeroClaw | Test
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: TBD
|
msg: TBD
|
||||||
### zeroclaw agent -m "Hello!" # quick test
|
### zeroclaw agent -m "Hello!" # quick test
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | ZeroClaw | 05 | Init Scripts | zeroclaw
|
### Nah, run on command instead of as daemon, otherwise will eat power.
|
||||||
ansible.builtin.debug:
|
###- name: Workstation | Linux | Software | ZeroClaw | Init Scripts | zeroclaw
|
||||||
msg: TBD
|
### ansible.builtin.debug:
|
||||||
### `/run/runit/zeroclaw/run`
|
### msg: TBD
|
||||||
### `zeroclaw daemon`
|
###### `/run/runit/zeroclaw/run`
|
||||||
|
###### `zeroclaw daemon`
|
||||||
- name: Workstation | Linux | Software | ZeroClaw | 05 | Init Scripts | ollama
|
|
||||||
ansible.builtin.debug:
|
|
||||||
msg: TBD
|
|
||||||
when: ansible_service_mgr == "runit"
|
|
||||||
### `/run/runit/ollama/run`
|
|
||||||
### `ollama serve`
|
|
||||||
|
|
||||||
when: ansible_pkg_mgr == "pacman"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
|
|||||||
Reference in New Issue
Block a user