Retire kosync and dir2opds now that Kavita handles both

Kavita's KOReader sync API and OPDS feed replace them, and both readers
(Kindle KOReader, Xteink X4) now point at books.thesatelliteoflove.com.
Drops their stacks, the sync. and opds. routes and DNS records, and the
htpasswd tasks that only existed for dir2opds basic auth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Phil
2026-10-31 09:33:24 -06:00
co-authored by Claude Opus 5.5
parent 6a0819059b
commit 35852ee697
10 changed files with 1 additions and 150 deletions
@@ -5,41 +5,6 @@
loop:
- /opt/stacks/caddy
- name: Install apache2-utils for htpasswd
ansible.builtin.apt:
name: apache2-utils
state: present
update_cache: true
cache_valid_time: 3600
become: true
when: vault_dir2opds is defined
# bcrypt uses a random salt, so a fresh hash would change the Caddyfile (and
# restart Caddy) on every run. Reuse the deployed hash while it still matches
# the vault password; only make a new one when it doesn't.
- name: Get bcrypt hash for dir2opds basic auth
ansible.builtin.shell: |
set -eu
cur=$(awk -v u="$AUTH_USER" '/basic_?auth/ {b=1} b && $1 == u {print $2; exit}' \
/opt/stacks/caddy/Caddyfile 2>/dev/null || true)
if [ -n "$cur" ]; then
tmp=$(mktemp); trap 'rm -f "$tmp"' EXIT
printf '%s:%s\n' "$AUTH_USER" "$cur" > "$tmp"
if htpasswd -vb "$tmp" "$AUTH_USER" "$AUTH_PASS" >/dev/null 2>&1; then
echo "$AUTH_USER $cur"
exit 0
fi
fi
htpasswd -bnB "$AUTH_USER" "$AUTH_PASS" | awk -F: 'NF {print $1, $2}'
environment:
AUTH_USER: "{{ vault_dir2opds.basic_auth_user }}"
AUTH_PASS: "{{ vault_dir2opds.basic_auth_password }}"
register: dir2opds_basic_auth_hash_result
changed_when: false
check_mode: false
no_log: true
when: vault_dir2opds is defined
- name: template Caddyfile
ansible.builtin.template:
src: Caddyfile.j2
-26
View File
@@ -1,26 +0,0 @@
- name: make dir2opds directories
ansible.builtin.file:
path: "{{ item}}"
state: directory
loop:
- /opt/stacks/dir2opds
- name: make dir2opds book directories
ansible.builtin.file:
path: "{{ item}}"
state: directory
loop:
- /opt/stacks/dir2opds/books
- name: Template out the compose file
ansible.builtin.template:
src: dir2opds-compose.yml.j2
dest: /opt/stacks/dir2opds/compose.yml
owner: root
mode: '0644'
- name: deploy dir2opds stack
community.docker.docker_compose_v2:
project_src: /opt/stacks/dir2opds
files:
- compose.yml
-22
View File
@@ -1,22 +0,0 @@
- name: make kosync directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
loop:
- /opt/stacks/kosync
- /opt/stacks/kosync/logs/app
- /opt/stacks/kosync/logs/redis
- /opt/stacks/kosync/data/redis
- name: Template out the compose file
ansible.builtin.template:
src: kosync-compose.yml.j2
dest: /opt/stacks/kosync/compose.yml
owner: root
mode: '0644'
- name: deploy kosync stack
community.docker.docker_compose_v2:
project_src: /opt/stacks/kosync
files:
- compose.yml
-7
View File
@@ -22,10 +22,3 @@
import_tasks: manyfold.yml
tags: manyfold
- name: Install dir2opds
import_tasks: dir2opds.yml
tags: dir2opds
- name: Install koreader sync server
import_tasks: kosync.yml
tags: kosync