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

56 lines
1.9 KiB
JSON
Raw Normal View History

[
2024-10-26 10:31:15 +02:00
{
"name": "configuration | compute client secret hash | web",
"become": true,
"ansible.builtin.shell": {
"cmd": "authelia crypto hash generate bcrypt --password {{var_authelia_for_owncloud_web_client_secret}} | cut --delimiter=' ' --fields='2-'"
},
"register": "temp_authelia_for_owncloud_web_client_secret_hashed"
},
{
"name": "configuration | compute client secret hash | android",
"become": true,
"ansible.builtin.shell": {
"cmd": "authelia crypto hash generate bcrypt --password {{var_authelia_for_owncloud_android_client_secret}} | cut --delimiter=' ' --fields='2-'"
},
"register": "temp_authelia_for_owncloud_android_client_secret_hashed"
},
{
"name": "configuration | compute client secret hash | ios",
"become": true,
"ansible.builtin.shell": {
"cmd": "authelia crypto hash generate bcrypt --password {{var_authelia_for_owncloud_ios_client_secret}} | cut --delimiter=' ' --fields='2-'"
},
"register": "temp_authelia_for_owncloud_ios_client_secret_hashed"
},
{
"name": "configuration | emplace",
"become": true,
"loop": [
{"src": "authelia-client-conf-web.json.j2", "dest": "/etc/authelia/conf.d/clients/owncloud-web.json"},
{"src": "authelia-client-conf-desktop.json.j2", "dest": "/etc/authelia/conf.d/clients/owncloud-desktop.json"},
{"src": "authelia-client-conf-android.json.j2", "dest": "/etc/authelia/conf.d/clients/owncloud-android.json"},
{"src": "authelia-client-conf-ios.json.j2", "dest": "/etc/authelia/conf.d/clients/owncloud-ios.json"}
],
"ansible.builtin.template": {
"src": "{{item.src}}",
"dest": "{{item.dest}}"
}
},
{
"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"
}
}
]