solved variable bug

This commit is contained in:
Kevin Veen-Birkenbach 2025-01-26 17:38:34 +01:00
parent 08b56ec7cd
commit 49fbdce398
3 changed files with 6 additions and 15 deletions

View File

@ -1,5 +1,4 @@
oauth2-proxy:
#image: quay.io/oauth2-proxy/oauth2-proxy:v7.8.1
image: quay.io/oauth2-proxy/oauth2-proxy:{{oauth2_version}}
restart: {{docker_restart_policy}}
command: --config /oauth2-proxy.cfg

View File

@ -10,8 +10,6 @@ whitelist_domains=[".{{primary_domain}}"] # Required t
client_secret="{{oauth2_proxy_client_secret}}"
client_id="{{domain}}"
redirect_url="https://{{domain}}/oauth2/callback"
# in this case oauth2-proxy is going to visit
oidc_issuer_url="https://{{domain_keycloak}}/realms/{{primary_domain}}"
provider="oidc"
provider_display_name="Keycloak"

View File

@ -1,13 +1,7 @@
- name: "Add {{oauth2_configuration_file}} to detached_files if oauth2_proxy_active is true"
- name: "Merge detached_files with oauth2_configuration_file"
ansible.builtin.set_fact:
detached_files: >-
{{
(detached_files | default([])) +
[oauth2_configuration_file]
if oauth2_configuration_file not in (detached_files | default([]))
else detached_files | default([])
}}
when: oauth2_proxy_active | default(false)
merged_detached_files: "{{ detached_files + [oauth2_configuration_file] }}"
when: oauth2_proxy_active
- name: "backup detached files"
command: >
@ -15,7 +9,7 @@
args:
removes: "{{docker_compose_instance_directory}}{{ item }}"
become: true
loop: "{{ detached_files }}"
loop: "{{ merged_detached_files }}"
- name: checkout repository
ansible.builtin.shell: git checkout .
@ -38,9 +32,9 @@
args:
removes: "/tmp/{{docker_compose_project_name}}-{{ item }}.backup"
become: true
loop: "{{ detached_files }}"
loop: "{{ merged_detached_files }}"
- name: "copy {{ item }}"
- name: "copy {{ detached_files }} templates to server"
template:
src: "{{ item }}.j2"
dest: "{{docker_compose_instance_directory}}{{ item }}"