Files
ml 974486bc53 Replace Clay with n8n, Ollama, SearXNG and browserless; add Telegram assistant
Remove the Clay role (Claude Code web UI) and its Anthropic API key.

New roles:
- ollama: local CPU LLM (qwen3:4b-instruct), internal network only
- browserless: headless Chromium for JavaScript-heavy pages
- searxng: metasearch backend for the chat web_search tool
- n8n at agent.ladkau.de: web chat (/chat), scheduled workflows,
  Telegram bot; workflows and credentials are imported from the repo

Telegram bot: Gemini 3.8 -> Gemini 3.5 -> local Qwen fallback chain,
/qwen to force the local model, /stocks and a weekday schedule
(07:30, 13:00, 17:40) for the MTE.DE / PTX.F stock report.

Also: dashboard and check-services entries for the chat, vault checks
for the new secrets (n8n, SearXNG, Gemini, Telegram, SMTP), updated
CLAUDE.md, runbooks and README.
2026-10-03 17:10:33 +02:00

43 lines
1.5 KiB
YAML

---
- name: Restart n8n
community.docker.docker_compose_v2:
project_src: "{{ n8n_data_dir }}"
state: present
recreate: always
# "Import n8n content" is a topic, not a single handler: the tasks below all listen
# on it and run in the order they are defined (handlers cannot be blocks).
# Credentials first (workflows reference them by id), then workflows.
# Imported workflows start inactive; the ones marked "active": true are published.
# n8n only registers triggers/webhooks at startup, so restart afterwards.
- name: Wait for n8n to be ready (database migrations finished)
ansible.builtin.command: docker exec n8n wget -qO- http://localhost:5678/healthz/readiness
listen: Import n8n content
register: n8n_ready
changed_when: false
retries: 40
delay: 3
until: n8n_ready.rc == 0
- name: Import n8n credentials
ansible.builtin.command: docker exec n8n n8n import:credentials --separate --input=/import/credentials
listen: Import n8n content
no_log: true
changed_when: true
- name: Import n8n workflows
ansible.builtin.command: docker exec n8n n8n import:workflow --separate --input=/import/workflows
listen: Import n8n content
changed_when: true
- name: Publish active n8n workflows
ansible.builtin.command: docker exec n8n n8n publish:workflow --id={{ item }}
listen: Import n8n content
loop: "{{ n8n_publish_ids | from_json }}"
changed_when: true
- name: Restart n8n to register triggers
ansible.builtin.command: docker restart n8n
listen: Import n8n content
changed_when: true