feat: add blueprints for authentik ldap outpost and render values directly instead of using env vars
Signed-off-by: Bert-Jan Fikse <bert-jan@whatwedo.ch>
This commit is contained in:
parent
d25f1c5304
commit
e819770415
11 changed files with 312 additions and 53 deletions
10
roles/authentik/templates/set-outpost-token.py.j2
Normal file
10
roles/authentik/templates/set-outpost-token.py.j2
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from authentik.outposts.models import Outpost
|
||||
from authentik.core.models import Token
|
||||
o = Outpost.objects.get(name='{{ authentik_ldap_outpost.name }}')
|
||||
t = Token.objects.get(identifier=o.token_identifier)
|
||||
if t.key != '{{ authentik_ldap_outpost.token }}':
|
||||
t.key = '{{ authentik_ldap_outpost.token }}'
|
||||
t.save(update_fields=['key'])
|
||||
print('changed')
|
||||
else:
|
||||
print('ok')
|
||||
Loading…
Add table
Add a link
Reference in a new issue