feat(auth): integrate Grafana and Ntfy with Authentik SSO
ansible-core-mon / deploy (push) Successful in 24s
ansible-core-net / deploy (push) Successful in 39s
ansible-core-secrets / deploy (push) Successful in 12s
ansible-opnsense / deploy (push) Successful in 3s
ansible-rus-central / deploy (push) Successful in 36s

This commit is contained in:
karpenok committed 2026-11-11 16:52:38 +07:00
1 parent 3670bb6033
commit 811d65526b
9 files changed
+174 -6

No files matched your search

@@ -19,7 +19,8 @@
that:
- authentik_secret_key is defined and authentik_secret_key | length > 0
- authentik_postgres_password is defined and authentik_postgres_password | length > 0
fail_msg: "Один или оба секрета Authentik (AUTHENTIK_SECRET_KEY, AUTHENTIK_POSTGRES_PASSWORD) не переданы через переменные окружения!"
- grafana_oauth_client_secret is defined and grafana_oauth_client_secret | length > 0
fail_msg: "Один или несколько секретов Authentik (AUTHENTIK_SECRET_KEY, AUTHENTIK_POSTGRES_PASSWORD, GRAFANA_OAUTH_CLIENT_SECRET) не переданы!"
- name: Установить compose.yaml для Authentik
ansible.builtin.template:
@@ -30,7 +31,7 @@
mode: "0600"
no_log: true
- name: Синхронизировать blueprints Authentik
- name: Синхронизировать статические blueprints Authentik
ansible.builtin.copy:
src: blueprints/
dest: "{{ authentik_dir }}/blueprints/"
@@ -39,6 +40,16 @@
mode: "0644"
register: authentik_blueprint
- name: Установить шаблонные blueprints Authentik
ansible.builtin.template:
src: blueprints/grafana.yaml.j2
dest: "{{ authentik_dir }}/blueprints/grafana.yaml"
owner: root
group: root
mode: "0644"
register: authentik_blueprint_grafana
no_log: true
- name: Запустить сервисы Authentik через Docker Compose
ansible.builtin.command: docker compose -f {{ authentik_dir }}/compose.yaml up -d --remove-orphans
register: compose_up
@@ -46,7 +57,15 @@
- name: Перезапустить воркер Authentik при обновлении blueprints
ansible.builtin.command: docker compose -f {{ authentik_dir }}/compose.yaml restart authentik-worker
when: authentik_blueprint.changed and not compose_up.changed
when: (authentik_blueprint.changed or authentik_blueprint_grafana.changed) and not compose_up.changed
- name: Применить blueprints Authentik в authentik-server
ansible.builtin.command: >
docker compose -f {{ authentik_dir }}/compose.yaml exec -T authentik-server
ak apply_blueprint /blueprints/custom/traefik-dashboard.yaml /blueprints/custom/grafana.yaml
when: authentik_blueprint.changed or authentik_blueprint_grafana.changed or compose_up.changed
register: apply_blueprints_cmd
changed_when: true