[ { "name": "show vars", "when": "switch_show_vars", "ansible.builtin.debug": { "var": "vars.cfg_authelia_for_owncloud" } }, { "name": "configuration | client", "block": [ { "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": "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": "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": "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" } } ] } ] }, { "name": "configuration | apply", "become": true, "ansible.builtin.command": { "cmd": "/usr/bin/authelia-conf-compose" } }, { "name": "restart service", "become": true, "ansible.builtin.systemd_service": { "state": "restarted", "name": "authelia" } } ]