zeroclaw, use a runit script which de-escalates to the user.

This commit is contained in:
me
2026-10-06 15:40:12 -07:00
parent 7f9d59213f
commit ddfa5d5d81
+16 -22
View File
@@ -60,31 +60,25 @@
- "{{ ollama }}" - "{{ ollama }}"
state: present state: present
#- name: Workstation | Linux | Software | ZeroClaw | ollama | Script [runit]
# ansible.builtin.shell: "{{ item }}"
# loop:
# - "mkdir -p {{ ollama_runit_dir }}"
# - "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"
## This is safe to run without wasting too many resources, allows pulling. - name: Workstation | Linux | Software | ZeroClaw | ollama | Script [runit]
#- name: Workstation | Linux | Software | ZeroClaw | ollama | Enable ansible.builtin.shell: "{{ item }}"
# ansible.builtin.service: loop:
# name: "{{ ollama }}" - "mkdir -p {{ ollama_runit_dir }}"
# state: started - "echo '#!/bin/sh -e' > {{ ollama_runit_start }}"
# enabled: true - "echo '# Allow pulling LLMs for use with ZeroClaw.'>> {{ ollama_runit_start }}"
- "echo 'exec 2>&1' >> {{ ollama_runit_start }}"
- "echo 'exec chpst -u {{ user }} 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 | ollama | Enable - name: Workstation | Linux | Software | ZeroClaw | ollama | Enable
ansible.builtin.blockinfile: ansible.builtin.service:
path: "{{ user_user.home }}/.config/i3/config" name: "{{ ollama }}"
marker: "# {mark} MANAGED BY ANSIBLE | zeroclaw" state: started
block: | enabled: true
exec_always --no-startup-id pgrep -x ollama || ollama serve >~/Reports/{{ ansible_hostname }}.ollama.log 2>&1
state: present
- name: Workstation | Linux | Software | ZeroClaw | Models | Install - name: Workstation | Linux | Software | ZeroClaw | Models | Install
ansible.builtin.shell: | ansible.builtin.shell: |