zeroclaw, add runit script for web daemon.
This commit is contained in:
@@ -112,6 +112,41 @@
|
|||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | runit | Script
|
||||||
|
ansible.builtin.copy:
|
||||||
|
content: |
|
||||||
|
#!/bin/sh -e
|
||||||
|
# Allow using the ZeroClaw frontend.
|
||||||
|
exec 2>&1
|
||||||
|
exec chpst -u {{ user }} zeroclaw daemon
|
||||||
|
dest: "{{ zeroclaw_runit_start }}"
|
||||||
|
mode: "0755"
|
||||||
|
when: ansible_service_mgr == "runit"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | runit | Log | Script
|
||||||
|
ansible.builtin.copy:
|
||||||
|
content: |
|
||||||
|
#!/bin/sh -e
|
||||||
|
exec svlogd -tt {{ zeroclaw_runit_log_dest }}
|
||||||
|
dest: "{{ zeroclaw_runit_start }}"
|
||||||
|
mode: "0755"
|
||||||
|
when: ansible_service_mgr == "runit"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | runit | Log | Config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
content: |
|
||||||
|
s1000000 # rotate at 1 MB
|
||||||
|
n5 # keep 5 old files
|
||||||
|
dest: "{{ zeroclaw_runit_log_config }}"
|
||||||
|
mode: "0755"
|
||||||
|
when: ansible_service_mgr == "runit"
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | Enable
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: "{{ zeroclaw }}"
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | ZeroClaw | ollama | Wait
|
- name: Workstation | Linux | Software | ZeroClaw | ollama | Wait
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
url: http://127.0.0.1:11434/api/version
|
url: http://127.0.0.1:11434/api/version
|
||||||
@@ -162,17 +197,15 @@
|
|||||||
become: true
|
become: true
|
||||||
become_user: "{{ user }}"
|
become_user: "{{ user }}"
|
||||||
|
|
||||||
#- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | Config
|
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | Wait
|
||||||
# ansible.builtin.copy:
|
ansible.builtin.uri:
|
||||||
# src: files/settings/zeroclaw.config.toml
|
url: http://127.0.0.1:42617/api/version
|
||||||
# dest: "{{ user_user.home }}/.zeroclaw/config.toml"
|
status_code: 200
|
||||||
# owner: "{{ user }}"
|
timeout: 5
|
||||||
# mode: "0644"
|
register: health
|
||||||
|
until: health.status == 200
|
||||||
- name: Workstation | Linux | Software | ZeroClaw | zeroclaw | Test
|
retries: 12
|
||||||
ansible.builtin.debug:
|
delay: 5
|
||||||
msg: TBD
|
|
||||||
### zeroclaw agent -m "Hello!" # quick test
|
|
||||||
|
|
||||||
### Nah, run on command instead of as daemon, otherwise will eat power.
|
### Nah, run on command instead of as daemon, otherwise will eat power.
|
||||||
###- name: Workstation | Linux | Software | ZeroClaw | Init Scripts | zeroclaw
|
###- name: Workstation | Linux | Software | ZeroClaw | Init Scripts | zeroclaw
|
||||||
|
|||||||
Reference in New Issue
Block a user