Some checks failed
PR Checklist / pr-checklist (pull_request) Failing after 1m27s
Implements the Ansible Infrastructure as Code story from KT 2026-04-08. One canonical Ansible playbook defines: - Deadman switch (snapshot good config on health, rollback+restart on death) - Golden state config deployment (Anthropic BANNED, Kimi→Gemini→Ollama) - Cron schedule (source-controlled, no manual crontab edits) - Agent startup sequence (pull→validate→start→verify) - request_log telemetry table (every inference call logged) - Thin config pattern (immutable local pointer to upstream) - Gitea webhook handler (deploy on merge) - Config validator (rejects banned providers) Fleet inventory: Timmy (Mac), Allegro (VPS), Bezalel (VPS), Ezra (VPS) Roles: wizard_base, golden_state, deadman_switch, request_log, cron_manager Addresses: timmy-config #442, #443, #444, #445, #446 References: KT Final 2026-04-08 P2, KT Bezalel 2026-04-08 #1-#5
70 lines
1.7 KiB
YAML
70 lines
1.7 KiB
YAML
---
|
|
# =============================================================================
|
|
# wizard_base/tasks — Common wizard setup
|
|
# =============================================================================
|
|
|
|
- name: "Create wizard directories"
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: "0755"
|
|
loop:
|
|
- "{{ wizard_home }}"
|
|
- "{{ wizard_home }}/workspace"
|
|
- "{{ hermes_home }}"
|
|
- "{{ hermes_home }}/bin"
|
|
- "{{ hermes_home }}/skins"
|
|
- "{{ hermes_home }}/playbooks"
|
|
- "{{ hermes_home }}/memories"
|
|
- "~/.local/timmy"
|
|
- "~/.local/timmy/fleet-health"
|
|
- "~/.local/timmy/snapshots"
|
|
- "~/.timmy"
|
|
|
|
- name: "Clone/update timmy-config"
|
|
git:
|
|
repo: "{{ upstream_repo }}"
|
|
dest: "{{ wizard_home }}/workspace/timmy-config"
|
|
version: "{{ upstream_branch }}"
|
|
force: false
|
|
update: true
|
|
ignore_errors: true # May fail on first run if no SSH key
|
|
|
|
- name: "Deploy SOUL.md"
|
|
copy:
|
|
src: "{{ wizard_home }}/workspace/timmy-config/SOUL.md"
|
|
dest: "~/.timmy/SOUL.md"
|
|
remote_src: true
|
|
mode: "0644"
|
|
ignore_errors: true
|
|
|
|
- name: "Deploy thin config (immutable pointer to upstream)"
|
|
template:
|
|
src: thin_config.yml.j2
|
|
dest: "{{ thin_config_path }}"
|
|
mode: "{{ thin_config_mode }}"
|
|
tags: [thin_config]
|
|
|
|
- name: "Ensure Python3 and pip are available"
|
|
package:
|
|
name:
|
|
- python3
|
|
- python3-pip
|
|
state: present
|
|
when: machine_type == 'vps'
|
|
ignore_errors: true
|
|
|
|
- name: "Ensure PyYAML is installed (for config validation)"
|
|
pip:
|
|
name: pyyaml
|
|
state: present
|
|
when: machine_type == 'vps'
|
|
ignore_errors: true
|
|
|
|
- name: "Create Ansible log directory"
|
|
file:
|
|
path: /var/log/ansible
|
|
state: directory
|
|
mode: "0755"
|
|
ignore_errors: true
|