Skip to content

Commit

Permalink
authentik: update saltbox_facts usage
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Mar 14, 2024
1 parent ec904ed commit 51db409
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
20 changes: 1 addition & 19 deletions roles/authentik/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,30 +58,12 @@
dns_zone: "{{ lookup('vars', role_name + '_dns_zone') }}"
dns_proxy: "{{ lookup('vars', role_name + '_dns_proxy') }}"

- name: "Load Authentik Saltbox facts"
saltbox_facts:
role: "authentik"
instance: "authentik"
method: "load"
keys:
secret_key: ""
register: authentik_saltbox_facts_tmp

- name: "Save Authentik Saltbox facts"
saltbox_facts:
role: "authentik"
instance: "authentik"
method: "save"
keys:
secret_key: "{{ authentik_saltbox_facts_tmp.facts.secret_key | default(lookup('ansible.builtin.password', '/dev/null', chars=['ascii_letters', 'digits'], length=50)) }}"

- name: "Load Authentik Saltbox facts"
saltbox_facts:
role: "authentik"
instance: "authentik"
method: "load"
keys:
secret_key: ""
secret_key: "{{ lookup('ansible.builtin.password', '/dev/null', chars=['ascii_letters', 'digits'], length=50) }}"
register: authentik_saltbox_facts

- name: Create Docker container
Expand Down
1 change: 0 additions & 1 deletion roles/authentik/tasks/subtasks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
saltbox_facts:
role: "authentik"
instance: "authentik"
method: "save"
keys:
api_token: "{{ authentik_admin_token }}"

Expand Down

0 comments on commit 51db409

Please sign in to comment.