Files

44 lines
1.5 KiB
YAML

---
# Example playbook for the config repo: ansible/playbooks/portfolio-next.yml
#
# portfolio-next (lucaswinther.info) on proxy-net, its builds and state in a bind mount.
#
# proxy-net is owned by nginx-proxy.yml. stack_networks still names the network
# so this playbook runs on its own; creating one that exists is a no-op.
#
# data/ is handed to uid 1000, the user the image runs as, so it can write its
# builds and state.json there. Setting owner is what makes the role escalate, so
# homelab has to have been bootstrapped with -e deploy_sudo=true.
#
# Secrets come from kv/stacks/portfolio-next in OpenBao: the content repo bot's
# read-only token, the Ghost Content API key, the Trakt client id, the Hardcover token.
- name: Deploy portfolio-next
hosts: homelab
gather_facts: false
tags: [portfolio-next]
roles:
- role: compose_stack
vars:
stack_name: portfolio-next
stack_secrets:
CONTENT_REPO_TOKEN:
path: stacks/portfolio-next
field: content_repo_token
GHOST_CONTENT_KEY:
path: stacks/portfolio-next
field: ghost_content_key
TRAKT_CLIENT_ID:
path: stacks/portfolio-next
field: trakt_client_id
HARDCOVER_TOKEN:
path: stacks/portfolio-next
field: hardcover_token
stack_networks:
- proxy-net
stack_dirs:
- path: "{{ stack_dest }}/data"
owner: "1000"
group: "1000"
recurse: true