Cut the comment bloat from the Podman playbooks
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.
This commit is contained in:
1 parent
2aab1aec1e
commit
476a6d7cd0
85 files changed
+372
-2433
No files matched your search
+9
-38
@@ -1,58 +1,29 @@
|
||||
---
|
||||
# ---------------------------------------------------------------------------
|
||||
# Rootless Podman / Quadlet
|
||||
# ---------------------------------------------------------------------------
|
||||
# Duplicated on purpose from caddy/vars/default.yml: a play cannot include that
|
||||
# file wholesale, because it also sets `host_directory` — to the Caddy data
|
||||
# directory — and every playbook defines that for itself. Keep these three in
|
||||
# sync with caddy/vars/default.yml. (Its fourth, podman_unprivileged_port_start,
|
||||
# belongs to the podman tasks, which this play does not run: Valkey publishes
|
||||
# nothing host-side.)
|
||||
#
|
||||
# podman_user is derived from the connection: this play carries no become, so
|
||||
# the Quadlet units belong to whoever Ansible connects as. Requires gather_facts
|
||||
# (set in playbook.yml).
|
||||
# A play cannot include caddy/vars/default.yml, which also sets host_directory,
|
||||
# so keep these in sync with it. Set gather_facts: true for the facts below.
|
||||
podman_user: "{{ ansible_facts['user_id'] }}"
|
||||
podman_data_dir: "{{ ansible_facts['user_dir'] }}/podman-data"
|
||||
quadlet_dir: "{{ ansible_facts['user_dir'] }}/.config/containers/systemd"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Valkey
|
||||
# ---------------------------------------------------------------------------
|
||||
container_name: valkey
|
||||
unit_name: "{{ container_name }}.service"
|
||||
|
||||
# Fully qualified on purpose: rootless Podman resolves short names against
|
||||
# unqualified-search-registries, and there is no TTY to answer a prompt when the
|
||||
# systemd unit starts. The Docker-era playbook said `valkey/valkey:alpine`.
|
||||
# Fully qualified, because short names prompt for a registry and the unit has
|
||||
# no TTY.
|
||||
image: docker.io/valkey/valkey:alpine
|
||||
|
||||
host_directory: "{{ podman_data_dir }}/{{ container_name }}"
|
||||
|
||||
# The image's WORKDIR and VOLUME: the RDB snapshot and, if it is ever enabled,
|
||||
# the AOF live here. The contents are disposable — nothing needs to be copied
|
||||
# off monoco — but the mount is not: RDB persistence is on by default, and the
|
||||
# graceful stop of a rebuild writes a final snapshot here that the next
|
||||
# container loads. Keep it unless you also set `save ""`. See readme.md, "The
|
||||
# trade-off".
|
||||
# The image volume holds the RDB snapshot. A graceful stop writes a final one
|
||||
# here, so keep the mount unless you also set `save ""`.
|
||||
data_mount: /data
|
||||
|
||||
# The uid and gid of the image's `valkey` account. The uid is 999 — the one the
|
||||
# anonymous Docker volume was owned by (docs/podman-compat-audit.md §3.2) — but
|
||||
# the gid is *1000*, not 999: Alpine already has a gid 999, and the image's
|
||||
# Dockerfile says so outright ("alpine already has a gid 999, so we'll use the
|
||||
# next id") before dropping to the account with `setpriv --regid=valkey`.
|
||||
# Mapping both ids onto podman_user is what keeps {{ host_directory }} — owner
|
||||
# and group alike — with the connection user, instead of stranding the group on
|
||||
# a subgid the moment valkey-server writes a snapshot.
|
||||
# The image account is uid 999 and gid 1000, not 999: Alpine already has a gid
|
||||
# 999. Mapping both keeps host_directory owned by podman_user.
|
||||
app_uid: 999
|
||||
app_gid: 1000
|
||||
|
||||
# No PublishPort, on purpose: the Docker-era playbook published 127.0.0.1:6379,
|
||||
# and nothing on the host needs it. Clients reach Valkey over the app networks
|
||||
# that attach themselves; {{ container_port }} is the port inside the container.
|
||||
# No PublishPort: clients reach Valkey over the app networks, not the host.
|
||||
container_port: 6379
|
||||
|
||||
# Quadlet drop-in directory for the Valkey unit. Services attach themselves
|
||||
# here; see the "How services attach themselves" section of readme.md.
|
||||
valkey_dropin_dir: "{{ quadlet_dir }}/{{ container_name }}.container.d"
|
||||
Reference in new issue
Block a user