ansible-base/roles/authelia-for-owncloud/tasks/main.json

110 lines
2.9 KiB
JSON
Raw Normal View History

[
2024-10-26 10:31:15 +02:00
{
2025-10-07 17:04:47 +02:00
"name": "show vars",
"when": "switch_show_vars",
"ansible.builtin.debug": {
"var": "vars.cfg_authelia_for_owncloud"
}
2024-10-26 10:31:15 +02:00
},
{
2025-10-07 17:04:47 +02:00
"name": "configuration | client",
2025-10-07 14:35:48 +02:00
"block": [
{
2025-10-07 17:04:47 +02:00
"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"
}
}
]
2025-10-07 14:35:48 +02:00
},
{
2025-10-07 17:04:47 +02:00
"name": "configuration | client | desktop",
2025-10-07 17:07:08 +02:00
"when": "cfg_authelia_for_owncloud.desktop != None",
2025-10-07 17:04:47 +02:00
"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"
}
}
]
2025-10-07 14:35:48 +02:00
},
{
2025-10-07 17:04:47 +02:00
"name": "configuration | client | android",
2025-10-07 17:07:08 +02:00
"when": "cfg_authelia_for_owncloud.android != None",
2025-10-07 17:04:47 +02:00
"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"
}
}
]
2025-10-07 14:35:48 +02:00
},
{
2025-10-07 17:04:47 +02:00
"name": "configuration | client | ios",
2025-10-07 17:07:08 +02:00
"when": "cfg_authelia_for_owncloud.ios != None",
2025-10-07 17:04:47 +02:00
"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"
}
}
]
2025-10-07 14:35:48 +02:00
}
]
},
{
"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"
}
}
]