tasks/ldap.yml keeps cn=Funkwhale (password from Vault, in Funkwhale Users, Postfix Users and Dovecot Users). Mail goes out as funkwhale@eom.dev instead of listmonk's news account, and the account is a Dex superuser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.8 KiB
YAML
44 lines
1.8 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/fw-render]
|
|
- name: Render funkwhale 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:
|
|
funkwhale_django_secret_key: render-only-render-only-render-only-render-only-render-only
|
|
funkwhale_db_password: render-only-db-password
|
|
funkwhale_admin_password: render-only-admin
|
|
funkwhale_smtp_password: "render/only:p@ss"
|
|
funkwhale_oidc_client_secret: render-only
|
|
- 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, theme-configmap.yml, postgres.yml, funkwhale.yml, configure.py]
|
|
- 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, theme-configmap.yml, postgres.yml, funkwhale.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:
|
|
_funkwhale_ldap_dn: "cn={{ funkwhale_ldap_account.cn }},{{ funkwhale_ldap_account.ou }}"
|