- tasks/ldap.yml keeps cn=Harmony (harmony@eom.dev): password from Vault, in Harmony Users, Postfix Users and Dovecot Users. GoTrue sends as it, and it is an instance admin alongside eric@eom.dev. - theme.js hides the e-mail/password form; Register and /register (also in Caddy) go to https://www.eom.dev/members/. - The Dex button uses the square eom.dev icon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
61 lines
2.4 KiB
YAML
61 lines
2.4 KiB
YAML
# SPDX-License-Identifier: MIT-0
|
|
# Renders every template with throwaway values; no cluster access.
|
|
# ansible-playbook -i tests/inventory tests/render.yml [-e out=/tmp/harmony-render]
|
|
- name: Render harmony role templates
|
|
hosts: localhost
|
|
connection: local
|
|
gather_facts: false
|
|
vars:
|
|
role_path: "{{ playbook_dir }}/.."
|
|
out: "{{ playbook_dir }}/../.render"
|
|
tasks:
|
|
- name: Load role defaults
|
|
ansible.builtin.include_vars: "{{ role_path }}/defaults/main.yml"
|
|
- name: Throwaway secrets
|
|
ansible.builtin.set_fact:
|
|
harmony_oidc_client_secret: render-only
|
|
harmony_smtp_password: "render/only:p@ss"
|
|
_harmony_secrets:
|
|
JWT_SECRET: render-only-render-only-render-only-render-only
|
|
POSTGRES_PASSWORD: renderonlypassword
|
|
SECRET_KEY_BASE: render-only
|
|
REDIS_PASSWORD: renderonly
|
|
LISTENER_PASSWORD: renderonly
|
|
INTERNAL_API_SECRET: renderonly
|
|
LIVEKIT_API_KEY: APIrenderonly
|
|
LIVEKIT_API_SECRET: renderonly
|
|
SMTP_PASS: "render/only:p@ss"
|
|
OIDC_CLIENT_SECRET: render-only
|
|
ANON_KEY: anon.render.only
|
|
SERVICE_ROLE_KEY: service.render.only
|
|
VAPID_PUBLIC_KEY: vapid-public
|
|
VAPID_PRIVATE_KEY: vapid-private
|
|
- name: Output directory
|
|
ansible.builtin.file:
|
|
path: "{{ out }}"
|
|
state: directory
|
|
mode: "0700"
|
|
- name: Render
|
|
ansible.builtin.template:
|
|
src: "{{ role_path }}/templates/{{ item }}.j2"
|
|
dest: "{{ out }}/{{ item }}"
|
|
mode: "0600"
|
|
loop: [secret.yml, config.yml, db.yml, supabase.yml, harmony.yml, livekit.yml, bootstrap-job.yml]
|
|
- name: Manifests parse as YAML
|
|
ansible.builtin.assert:
|
|
that: lookup('ansible.builtin.file', out ~ '/' ~ item) | from_yaml_all | list | length > 0
|
|
quiet: true
|
|
loop: [secret.yml, config.yml, db.yml, supabase.yml, harmony.yml, livekit.yml, bootstrap-job.yml]
|
|
- name: Render the LDAP script
|
|
ansible.builtin.template:
|
|
src: "{{ role_path }}/templates/ldap-account.sh.j2"
|
|
dest: "{{ out }}/ldap-account.sh"
|
|
mode: "0600"
|
|
vars:
|
|
_harmony_ldap_dn: "cn={{ harmony_ldap_account.cn }},{{ harmony_ldap_account.ou }}"
|
|
- name: Render theme.js
|
|
ansible.builtin.template:
|
|
src: "{{ role_path }}/templates/theme.js.j2"
|
|
dest: "{{ out }}/theme.js"
|
|
mode: "0600"
|