Skip to content

Commit

Permalink
fix some variable logic and layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ahembree committed May 31, 2024
1 parent 9a48cd0 commit 2d20d4f
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .github/extra-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"hms_docker_container_map": {
"traefik": {
"enabled": true,
"proxy_host_rule": "traefik",
"proxy_host_rule": traefik,
"directory": true,
"traefik": true,
"authentik": false,
Expand Down
7 changes: 2 additions & 5 deletions roles/hmsdocker/tasks/authentik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
register: authentik_key_template_output
no_log: true
vars:
key: "{{ authentik_old_key if authentik_old_key is defined and authentik_old_key != '' else lookup('password', '/dev/null length=50 chars=ascii_letters') }}"
key: "{{ authentik_old_key | default(lookup('password', '/dev/null length=50 chars=ascii_letters')) }}"

- name: Ensure authentik postgres password file
ansible.builtin.template:
Expand All @@ -59,7 +59,7 @@
register: authentik_pgpass_template_output
no_log: true
vars:
key: "{{ authentik_old_pg_pass if authentik_old_pg_pass is defined and authentik_old_pg_pass != '' else lookup('password', '/dev/null length=50 chars=ascii_letters') }}"
key: "{{ authentik_old_pg_pass | default(lookup('password', '/dev/null length=50 chars=ascii_letters')) }}"

- name: Slurp authentik secret key data
ansible.builtin.slurp:
Expand Down Expand Up @@ -119,6 +119,3 @@
- item.key == 'sonarr' or item.key == 'radarr'
- item.value.authentik_provider_type is defined and item.value.authentik_provider_type == 'proxy'
- separate_4k_instances_enable is defined and separate_4k_instances_enable

#### if authentik_provision_config is defined and authentik_provision_config:
#### do the logic to configure providers, applications, etc
Loading

0 comments on commit 2d20d4f

Please sign in to comment.