Comment blocks now stay within three lines and explain only the non-obvious. Long histories, include examples, and commented-out code are gone. No task, key, or value changed; the only data change is comment text inside the generated unit files.
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
---
|
|
# Derived from the connection user; requires gather_facts.
|
|
podman_user: "{{ ansible_facts['user_id'] }}"
|
|
podman_data_dir: "{{ ansible_facts['user_dir'] }}/podman-data"
|
|
quadlet_dir: "{{ ansible_facts['user_dir'] }}/.config/containers/systemd"
|
|
|
|
host: audiobooks.tanshu.com
|
|
|
|
container_name: audiobookshelf
|
|
unit_name: "{{ container_name }}.service"
|
|
|
|
# Fully qualified so rootless Podman never prompts for a short name; there is no TTY.
|
|
image: ghcr.io/advplyr/audiobookshelf:latest
|
|
|
|
# The Quadlet file is <network_name>.network; register pins <network_name>_net.
|
|
network_name: "{{ container_name }}"
|
|
|
|
host_directory: "{{ podman_data_dir }}/{{ container_name }}"
|
|
|
|
# config/ and metadata/ hold irreplaceable state; the media directories can be re-downloaded.
|
|
config_dir: "{{ host_directory }}/config"
|
|
metadata_dir: "{{ host_directory }}/metadata"
|
|
audiobooks_dir: "{{ host_directory }}/audiobooks"
|
|
podcasts_dir: "{{ host_directory }}/podcasts"
|
|
|
|
container_port: 80
|
|
|
|
timezone: Asia/Kolkata
|
|
|
|
# The image ships no HEALTHCHECK; /healthcheck is the app's own endpoint.
|
|
# The runtime image has wget, not curl.
|
|
health_cmd: "wget -q -O /dev/null http://127.0.0.1:{{ container_port }}/healthcheck"
|
|
|
|
caddy_name: caddy
|
|
caddyfile_path: "{{ podman_data_dir }}/{{ caddy_name }}/conf/Caddyfile"
|
|
|
|
snippet_block: |
|
|
{{ host }} {
|
|
reverse_proxy {{ container_name }}:{{ container_port }}
|
|
}
|