--- # 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" container_name: valkey unit_name: "{{ container_name }}.service" # 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 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 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: clients reach Valkey over the app networks, not the host. container_port: 6379 valkey_dropin_dir: "{{ quadlet_dir }}/{{ container_name }}.container.d"