Files
ansible-role-listmonk/tests/render.yml
T
claudeandClaude Opus 5.5 3dd9cee930 Add a scoped API user for the membership app
The user can read and manage subscribers on the eom.dev list only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 20:27:42 -05:00

37 lines
1.3 KiB
YAML

# SPDX-License-Identifier: MIT-0
# Renders every template with throwaway values; no cluster access.
# ansible-playbook tests/render.yml -e out=/tmp/listmonk-render
- name: Render listmonk 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:
listmonk_db_password: render-only-db-password
listmonk_admin_password: render-only
listmonk_smtp_password: render-only
listmonk_oidc_client_secret: render-only
listmonk_api_token: render-only-api-token
- 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, postgres.yml, listmonk.yml, configure.sql]
- 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, postgres.yml, listmonk.yml]