feat: add ability to provision using blueprints
This commit is contained in:
parent
f814496049
commit
3f8afa12ef
4 changed files with 96 additions and 0 deletions
|
|
@ -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')
|
||||
}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue