From d5ae0ac07436b4490ec5d3c38e6b9960ad0411a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Tue, 7 Oct 2025 17:04:47 +0200 Subject: [PATCH] [int] --- roles/authelia-for-owncloud/tasks/main.json | 152 ++++++++++---------- 1 file changed, 78 insertions(+), 74 deletions(-) diff --git a/roles/authelia-for-owncloud/tasks/main.json b/roles/authelia-for-owncloud/tasks/main.json index 45ec048..7540977 100644 --- a/roles/authelia-for-owncloud/tasks/main.json +++ b/roles/authelia-for-owncloud/tasks/main.json @@ -1,89 +1,93 @@ [ { - "name": "configuration | client | web", - "when": "cfg_authelia_for_owncloud.web != None", - "block": [ - { - "name": "compute client secret hash", - "become": true, - "ansible.builtin.shell": { - "cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.web.client_secret}} | cut --delimiter=' ' --fields='2-'" - }, - "register": "temp_authelia_for_owncloud_web_client_secret_hashed" - }, - { - "name": "emplace", - "become": true, - "ansible.builtin.template": { - "src": "authelia-client-conf-web.json.j2", - "dest": "/etc/authelia/conf.d/clients/owncloud-web.json" - } - } - ] + "name": "show vars", + "when": "switch_show_vars", + "ansible.builtin.debug": { + "var": "vars.cfg_authelia_for_owncloud" + } }, { - "name": "configuration | client | desktop", - "when": "cfg_authelia_for_ownloud.desktop != None", + "name": "configuration | client", "block": [ { - "name": "compute client secret hash", - "become": true, - "ansible.builtin.shell": { - "cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.desktop.client_secret}} | cut --delimiter=' ' --fields='2-'" - }, - "register": "temp_authelia_for_owncloud_desktop_client_secret_hashed" + "name": "configuration | client | web", + "when": "cfg_authelia_for_owncloud.web != None", + "block": [ + { + "name": "emplace", + "become": true, + "ansible.builtin.template": { + "src": "authelia-client-conf-web.json.j2", + "dest": "/etc/authelia/conf.d/clients/owncloud-web.json" + } + } + ] }, { - "name": "emplace", - "become": true, - "ansible.builtin.template": { - "src": "authelia-client-conf-desktop.json.j2", - "dest": "/etc/authelia/conf.d/clients/owncloud-desktop.json" - } - } - ] - }, - { - "name": "configuration | client | android", - "when": "cfg_authelia_for_ownloud.android != None", - "block": [ - { - "name": "compute client secret hash", - "become": true, - "ansible.builtin.shell": { - "cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.android.client_secret}} | cut --delimiter=' ' --fields='2-'" - }, - "register": "temp_authelia_for_owncloud_android_client_secret_hashed" + "name": "configuration | client | desktop", + "when": "cfg_authelia_for_ownloud.desktop != None", + "block": [ + { + "name": "compute client secret hash", + "become": true, + "ansible.builtin.shell": { + "cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.desktop.client_secret}} | cut --delimiter=' ' --fields='2-'" + }, + "register": "temp_authelia_for_owncloud_desktop_client_secret_hashed" + }, + { + "name": "emplace", + "become": true, + "ansible.builtin.template": { + "src": "authelia-client-conf-desktop.json.j2", + "dest": "/etc/authelia/conf.d/clients/owncloud-desktop.json" + } + } + ] }, { - "name": "emplace", - "become": true, - "ansible.builtin.template": { - "src": "authelia-client-conf-android.json.j2", - "dest": "/etc/authelia/conf.d/clients/owncloud-android.json" - } - } - ] - }, - { - "name": "configuration | client | ios", - "when": "cfg_authelia_for_ownloud.ios != None", - "block": [ - { - "name": "compute client secret hash", - "become": true, - "ansible.builtin.shell": { - "cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.ios.client_secret}} | cut --delimiter=' ' --fields='2-'" - }, - "register": "temp_authelia_for_owncloud_ios_client_secret_hashed" + "name": "configuration | client | android", + "when": "cfg_authelia_for_ownloud.android != None", + "block": [ + { + "name": "compute client secret hash", + "become": true, + "ansible.builtin.shell": { + "cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.android.client_secret}} | cut --delimiter=' ' --fields='2-'" + }, + "register": "temp_authelia_for_owncloud_android_client_secret_hashed" + }, + { + "name": "emplace", + "become": true, + "ansible.builtin.template": { + "src": "authelia-client-conf-android.json.j2", + "dest": "/etc/authelia/conf.d/clients/owncloud-android.json" + } + } + ] }, { - "name": "emplace", - "become": true, - "ansible.builtin.template": { - "src": "authelia-client-conf-ios.json.j2", - "dest": "/etc/authelia/conf.d/clients/owncloud-ios.json" - } + "name": "configuration | client | ios", + "when": "cfg_authelia_for_ownloud.ios != None", + "block": [ + { + "name": "compute client secret hash", + "become": true, + "ansible.builtin.shell": { + "cmd": "authelia crypto hash generate bcrypt --password {{cfg_authelia_for_owncloud.ios.client_secret}} | cut --delimiter=' ' --fields='2-'" + }, + "register": "temp_authelia_for_owncloud_ios_client_secret_hashed" + }, + { + "name": "emplace", + "become": true, + "ansible.builtin.template": { + "src": "authelia-client-conf-ios.json.j2", + "dest": "/etc/authelia/conf.d/clients/owncloud-ios.json" + } + } + ] } ] },