Decouple ZIM/torrent ansible tasks for faster provisioning #18

Merged
eblume merged 1 commit from feature/decouple-zim-torrent-ansible into main 2026-01-16 15:14:00 -08:00
Owner

Summary

  • Simplify kiwix role from 213 lines to 151 lines (-30%)
  • Replace per-archive torrent status loops with single shell command
  • Decouple kiwix startup from declared inventory - now serves whatever completed ZIM files exist
  • Fix tailscale_serve role to handle empty JSON in check mode

Performance improvement

  • Before: ~132 operations (44 archives × 3 loops for status check, recheck, symlink)
  • After: ~5 operations (1 shell script + 1 find + conditional symlinks)
  • Expected reduction: ~3 minutes per ansible run

Test plan

  • Ran mise run provision-indri -- --check --diff to preview changes
  • Ran mise run provision-indri to apply changes
  • Ran mise run indri-services-check - all services healthy

🤖 Generated with Claude Code

## Summary - Simplify kiwix role from 213 lines to 151 lines (-30%) - Replace per-archive torrent status loops with single shell command - Decouple kiwix startup from declared inventory - now serves whatever completed ZIM files exist - Fix tailscale_serve role to handle empty JSON in check mode ## Performance improvement - **Before**: ~132 operations (44 archives × 3 loops for status check, recheck, symlink) - **After**: ~5 operations (1 shell script + 1 find + conditional symlinks) - Expected reduction: ~3 minutes per ansible run ## Test plan - [x] Ran `mise run provision-indri -- --check --diff` to preview changes - [x] Ran `mise run provision-indri` to apply changes - [x] Ran `mise run indri-services-check` - all services healthy 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Simplify kiwix role from 213 lines to 151 lines
- Replace per-archive torrent status loops with single shell command
- Decouple kiwix startup from declared inventory - now serves whatever
  completed ZIM files exist in transmission download directory
- Remove redundant status rechecks and waits
- Fix tailscale_serve role to handle empty JSON in check mode

This reduces ansible runtime by ~3 minutes by eliminating O(n) shell
invocations per archive (previously ~132 operations, now ~5).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
eblume merged commit d3d3041b27 into main 2026-01-16 15:14:00 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eblume/blumeops!18
No description provided.