feat(authentik): add blueprint directory setup and apply functionality
ansible-core-net / deploy (push) Successful in 35s

This commit is contained in:
karpenok committed 2026-11-10 21:03:25 +07:00
1 parent f0f3b61407
commit 3a8ef2579b
3 files changed
+61

No files matched your search

+20
View File
@@ -13,6 +13,7 @@
- { path: "{{ authentik_dir }}/redis", owner: "999", group: "999", mode: "0700", recurse: true }
- { path: "{{ authentik_dir }}/media", owner: "1000", group: "1000", mode: "0775", recurse: true }
- { path: "{{ authentik_dir }}/custom-templates", owner: "1000", group: "1000", mode: "0775", recurse: true }
- { path: "{{ authentik_dir }}/blueprints", owner: "root", group: "root", mode: "0755" }
register: authentik_dirs
- name: Проверить наличие обязательных секретов Authentik
@@ -31,6 +32,15 @@
mode: "0600"
no_log: true
- name: Установить blueprint каталога пользователей Authentik
ansible.builtin.copy:
src: blueprints/
dest: "{{ authentik_dir }}/blueprints/"
owner: root
group: root
mode: "0644"
register: authentik_blueprint
- name: Запустить сервисы Authentik через Docker Compose
ansible.builtin.command: docker compose -f {{ authentik_dir }}/compose.yaml up -d --remove-orphans
register: compose_up
@@ -40,4 +50,14 @@
ansible.builtin.command: docker compose -f {{ authentik_dir }}/compose.yaml restart authentik-db authentik-server
when: authentik_dirs.changed
- name: Применить blueprint каталога пользователей Authentik
ansible.builtin.command: >-
docker compose -f {{ authentik_dir }}/compose.yaml exec -T authentik-worker
ak apply_blueprint /blueprints/custom/homelab-directory.yaml
register: authentik_blueprint_apply
changed_when: authentik_blueprint.changed
retries: 18
delay: 10
until: authentik_blueprint_apply.rc == 0