diff --git a/roles/authelia-for-vikunja/tasks/main.json b/roles/authelia-for-vikunja/tasks/main.json index 3067d3d..7759d34 100644 --- a/roles/authelia-for-vikunja/tasks/main.json +++ b/roles/authelia-for-vikunja/tasks/main.json @@ -1,4 +1,12 @@ [ + { + "name": "configuration | compute client secret hash", + "become": true, + "ansible.builtin.shell": { + "cmd": "authelia crypto hash generate bcrypt --password {{var_authelia_for_vikunja_client_secret}} | cut --delimiter=' ' --fields='2-'" + }, + "register": "temp_authelia_for_vikunja_client_secret_hashed" + }, { "name": "configuration | emplace", "become": true, diff --git a/roles/authelia-for-vikunja/templates/authelia-client-conf.json.j2 b/roles/authelia-for-vikunja/templates/authelia-client-conf.json.j2 index a288ae0..2db8bae 100644 --- a/roles/authelia-for-vikunja/templates/authelia-client-conf.json.j2 +++ b/roles/authelia-for-vikunja/templates/authelia-client-conf.json.j2 @@ -1,6 +1,6 @@ { "client_id": "{{var_authelia_for_vikunja_client_id}}", - "client_secret": "{{var_authelia_for_vikunja_client_secret}}", + "client_secret": "{{temp_authelia_for_vikunja_client_secret_hashed.stdout}}", "client_name": "Vikunja", "public": false, "authorization_policy": "one_factor",