Skip to content

Commit

Permalink
traefik: use authentik_is_master to inherit master toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Aug 4, 2024
1 parent 5fbef7c commit f3ba62d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions inventories/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ global_themepark_plugin_enabled: false

authelia_is_master: "{{ authelia.master | bool }}"


################################
# Authentik
################################

authentik_is_master: "{{ authelia.master | bool }}"

################################
# ZeroSSL
################################
Expand Down
4 changes: 2 additions & 2 deletions roles/traefik/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ traefik_docker_labels_default:
traefik.http.middlewares.authelia-basic.forwardauth.trustForwardHeader: "true"
traefik.http.middlewares.authelia-basic.forwardauth.authResponseHeaders: "Remote-User, Remote-Groups, Remote-Name, Remote-Email"
traefik.http.middlewares.authentik.forwardauth.address: "{{ 'http://' + authentik_name + ':9000/outpost.goauthentik.io/auth/traefik'
if authelia_is_master
else authentik_web_url + '/outpost.goauthentik.io/auth/traefik' }}"
if authentik_is_master
else authentik_web_url + '/outpost.goauthentik.io/auth/traefik' }}"
traefik.http.middlewares.authentik.forwardauth.trustForwardHeader: "true"
traefik.http.middlewares.authentik.forwardauth.authResponseHeaders: "X-authentik-username,X-authentik-groups,X-authentik-email,X-authentik-name,X-authentik-uid,X-authentik-jwt,X-authentik-meta-jwks,X-authentik-meta-outpost,X-authentik-meta-provider,X-authentik-meta-app,X-authentik-meta-version"

Expand Down
2 changes: 1 addition & 1 deletion roles/traefik/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
- name: "Import Authentik Role"
ansible.builtin.include_role:
name: authentik
when: traefik_authentik_enabled and authelia_is_master
when: traefik_authentik_enabled and authentik_is_master

- name: "Import Error Pages Role"
ansible.builtin.include_role:
Expand Down

0 comments on commit f3ba62d

Please sign in to comment.