feat: add ability to provision using blueprints

This commit is contained in:
Bert-Jan Fikse 2026-01-14 13:49:40 +01:00
parent f814496049
commit 3f8afa12ef
Signed by: bert-jan
GPG key ID: C1E0AB516AC16D1A
4 changed files with 96 additions and 0 deletions

View file

@ -32,6 +32,20 @@
state: directory
mode: '0755'
- name: Create blueprints directory
file:
path: "{{ authentik_docker_volume_dir }}/blueprints"
state: directory
mode: '0755'
- name: Render OIDC blueprints
ansible.builtin.template:
src: blueprints/blueprint-oidc-app.yaml.j2
dest: "{{ authentik_docker_volume_dir }}/blueprints/10-oidc-{{ item.slug }}.yaml"
mode: "0644"
loop: "{{ authentik_oidc_apps }}"
register: oidc_templates
- name: Create docker-compose file for authentik
template:
src: docker-compose.yml.j2
@ -42,3 +56,10 @@
community.docker.docker_compose_v2:
project_src: "{{ authentik_docker_compose_dir }}"
state: present
recreate: >-
{{
(
(oidc_templates is defined and (oidc_templates.results | selectattr('changed') | list | length > 0))
or (proxy_templates is defined and (proxy_templates.results | selectattr('changed') | list | length > 0))
) | ternary('always','auto')
}}