Skip to content

Commit

Permalink
Authelia: Fix redis hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
owine committed Jan 5, 2024
1 parent 3c2b3ad commit 2bd4c26
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion roles/authelia/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
ansible.builtin.include_role:
name: redis
vars:
redis_instances: ["authelia_redis"]
redis_instances: ["authelia-redis"]

- name: Add DNS record
ansible.builtin.include_tasks: "{{ resources_tasks_path }}/dns/tasker.yml"
Expand Down
4 changes: 2 additions & 2 deletions roles/authelia/tasks/subtasks/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

- name: Settings | Change session.redis.host value to 'authelia_redis'
ansible.builtin.shell: |
yyq e -i '.session.redis.host = "authelia_redis"' {{ authelia_paths_location }}/configuration.yml
yyq e -i '.session.redis.host = "authelia-redis"' {{ authelia_paths_location }}/configuration.yml
become: true
become_user: "{{ user.name }}"
when: authelia_session_redis_host.stdout == "redis"
when: (authelia_session_redis_host.stdout == "redis") or (authelia_session_redis_host.stdout == "authelia_redis")
2 changes: 1 addition & 1 deletion roles/authelia/templates/configuration.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ session:
same_site: lax
domain: {{ user.domain | lower }}
redis:
host: authelia_redis
host: authelia-redis
port: 6379

regulation:
Expand Down
9 changes: 7 additions & 2 deletions roles/redis/tasks/main2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
- name: Remove legacy Docker container
ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml"
vars:
var_prefix: "redis"
when: (redis_name == "authelia_redis")
var_prefix: "{{ item }}"
when: (redis_name == "authelia-redis")
with_items:
- "authelia_redis"
- "redis"
loop_control:
loop_var: item

- name: Reset Redis directory
ansible.builtin.file:
Expand Down

0 comments on commit 2bd4c26

Please sign in to comment.