From 4c925082f3f25c3dc4d64bb37a4b0eb1775b83c4 Mon Sep 17 00:00:00 2001 From: cmsassot Date: Tue, 13 Sep 2022 10:41:28 +0200 Subject: [PATCH 1/3] Ajout variables d'environement hydra-oidc --- defaults/main.yml | 1 + templates/cadoles-pod-hydra-oidc-v1.conf.j2 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 7f605bf..54e8dfc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -199,6 +199,7 @@ hydra_oidc_post_logout_redirect_url: hydra_oidc_scope: openid email hydra_oidc_client_id: hydra_oidc_client_secret: +hydra_oidc_environment_opts: [] hydra_oidc_attributes_rewrite_rules: email: diff --git a/templates/cadoles-pod-hydra-oidc-v1.conf.j2 b/templates/cadoles-pod-hydra-oidc-v1.conf.j2 index a2432e9..e67f6ef 100644 --- a/templates/cadoles-pod-hydra-oidc-v1.conf.j2 +++ b/templates/cadoles-pod-hydra-oidc-v1.conf.j2 @@ -19,4 +19,7 @@ PODMAN_ARGS="\ -e 'CLIENT_ID_FC={{ hydra_oidc_client_id }}' \ -e 'CLIENT_SECRET_FC={{ hydra_oidc_client_secret }}' \ -e 'TRUSTED_PROXIES=127.0.0.1,10.0.2.0/24' \ + {% for item in hydra_oidc_environment_opts %} + -e '{{ item.environment_var_name }}={{ item.value }}' \ + {% endfor %} " \ No newline at end of file -- 2.17.1 From a3c83fbd86ae30722b7ace04722d4d4be6549582 Mon Sep 17 00:00:00 2001 From: cmsassot Date: Tue, 13 Sep 2022 11:13:49 +0200 Subject: [PATCH 2/3] Ajout variables d'environement hydra-oidc --- defaults/main.yml | 2 +- templates/cadoles-pod-hydra-oidc-v1.conf.j2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 54e8dfc..d7064be 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -199,7 +199,7 @@ hydra_oidc_post_logout_redirect_url: hydra_oidc_scope: openid email hydra_oidc_client_id: hydra_oidc_client_secret: -hydra_oidc_environment_opts: [] +hydra_oidc_additionnal_env: {} hydra_oidc_attributes_rewrite_rules: email: diff --git a/templates/cadoles-pod-hydra-oidc-v1.conf.j2 b/templates/cadoles-pod-hydra-oidc-v1.conf.j2 index e67f6ef..4d7ffbc 100644 --- a/templates/cadoles-pod-hydra-oidc-v1.conf.j2 +++ b/templates/cadoles-pod-hydra-oidc-v1.conf.j2 @@ -19,7 +19,7 @@ PODMAN_ARGS="\ -e 'CLIENT_ID_FC={{ hydra_oidc_client_id }}' \ -e 'CLIENT_SECRET_FC={{ hydra_oidc_client_secret }}' \ -e 'TRUSTED_PROXIES=127.0.0.1,10.0.2.0/24' \ - {% for item in hydra_oidc_environment_opts %} - -e '{{ item.environment_var_name }}={{ item.value }}' \ + {% for item in hydra_oidc_additionnal_env.values() %} + -e '{{ item.name }}={{ item.value }}' \ {% endfor %} " \ No newline at end of file -- 2.17.1 From 1bbe96e13e86dfeed4520ecb1020a079c4da4f98 Mon Sep 17 00:00:00 2001 From: cmsassot Date: Wed, 14 Sep 2022 11:27:06 +0200 Subject: [PATCH 3/3] Correction boucle hydra_oidc_additionnal_env --- templates/cadoles-pod-hydra-oidc-v1.conf.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/cadoles-pod-hydra-oidc-v1.conf.j2 b/templates/cadoles-pod-hydra-oidc-v1.conf.j2 index 4d7ffbc..7dbc700 100644 --- a/templates/cadoles-pod-hydra-oidc-v1.conf.j2 +++ b/templates/cadoles-pod-hydra-oidc-v1.conf.j2 @@ -19,7 +19,7 @@ PODMAN_ARGS="\ -e 'CLIENT_ID_FC={{ hydra_oidc_client_id }}' \ -e 'CLIENT_SECRET_FC={{ hydra_oidc_client_secret }}' \ -e 'TRUSTED_PROXIES=127.0.0.1,10.0.2.0/24' \ - {% for item in hydra_oidc_additionnal_env.values() %} - -e '{{ item.name }}={{ item.value }}' \ + {% for key,value in hydra_oidc_additionnal_env.items() %} + -e '{{ key }}={{ value }}' \ {% endfor %} " \ No newline at end of file -- 2.17.1