Compare commits

...

9 commits

Author SHA1 Message Date
Bltzz
71306a2cd1 ffs 2024-10-22 23:00:59 +02:00
Bltzz
1d43361c72 ffs 2024-10-22 22:54:06 +02:00
Bltzz
3a9f812be1 ffs 2024-10-22 22:48:59 +02:00
Bltzz
3722602203 ffs 2024-10-22 22:47:31 +02:00
Bltzz
bfbaf515c2 ffs 2024-10-22 22:46:57 +02:00
Bltzz
1d495e1798 ffs 2024-10-22 22:45:35 +02:00
Bltzz
36f9d091e4 ffs 2024-10-22 22:39:28 +02:00
Bltzz
a958f1abd7 ffs 2024-10-22 22:38:43 +02:00
rfl
0909683e87 ffs 2024-10-22 22:37:12 +02:00

View file

@ -1,24 +1,7 @@
# Attempt to fix json with pillar variables in variable
{% set client_secret = salt['pillar.get']('paperless:webserver:keycloak:client_secret', '<CLIENT_SECRET>') %}
{% set oauth_server = salt['pillar.get']('paperless:webserver:keycloak:server_url', 'https://<KEYCLOAK_SERVER>/realms/<REALM>/.well-known/openid-configuration') %}
{% set PAPERLESS_SOCIALACCOUNT_PROVIDERS =
{
'openid_connect': {
'APPS': [
{
'provider_id': 'keycloak',
'name': 'Keycloak',
'client_id': 'paperless',
'secret': client_secret,
'settings': {
'server_url': oauth_server
}
}
]
}
}
%}
{% set PAPERLESS_SOCIALACCOUNT_PROVIDERS_ = {'openid_connect':{'APPS':[{'provider_id': 'keycloak', 'name': 'Keycloak', 'client_id': 'paperless', 'secret': client_secret, 'settings':{'server_url': oauth_server}}]}}|tojson%}
broker-data-directory-exists:
file.directory:
@ -122,28 +105,6 @@ tika-docker-container-running:
- networks:
- paperless-network
# Attempt to fix json with pillar variables in variable
{% set client_secret = salt['pillar.get']('paperless:webserver:keycloak:client_secret', '<CLIENT_SECRET>') %}
{% set oauth_server = salt['pillar.get']('paperless:webserver:keycloak:server_url', 'https://<KEYCLOAK_SERVER>/realms/<REALM>/.well-known/openid-configuration') %}
{% set PAPERLESS_SOCIALACCOUNT_PROVIDERS_ =
{
'openid_connect': {
'APPS': [
{
'provider_id': 'keycloak',
'name': 'Keycloak',
'client_id': 'paperless',
'secret': client_secret,
'settings': {
'server_url': oauth_server
}
}
]
}
}
%}
paperless-docker-container-running:
docker_container.running:
# The Docker setup does not use the configuration file.
@ -161,7 +122,7 @@ paperless-docker-container-running:
- PAPERLESS_TIKA_GOTENBERG_ENDPOINT={{ salt['pillar.get']('paperless:webserver:environment:tika_gotenberg_endpoint', 'http://gotenberg:3000') }}
- PAPERLESS_APPS=allauth.socialaccount.providers.openid_connect
- PAPERLESS_SOCIALACCOUNT_PROVIDERS="{{ PAPERLESS_SOCIALACCOUNT_PROVIDERS_ }}"
- PAPERLESS_SOCIALACCOUNT_PROVIDERS={{ PAPERLESS_SOCIALACCOUNT_PROVIDERS_ }}
- PAPERLESS_DISABLE_REGULAR_LOGIN={{ salt['pillar.get']('paperless:webserver:environment:disable_regular_login', 'true') }}
- PAPERLESS_REDIRECT_LOGIN_TO_SSO={{ salt['pillar.get']('paperless:webserver:environment:redirect_login_to_sso', 'true') }}