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

132 lines
2.7 KiB
JSON
Raw Permalink Normal View History

2023-12-10 14:33:45 +01:00
[
{
2023-12-16 11:33:38 +01:00
"name": "packages | prerequisites",
2023-12-11 02:43:58 +01:00
"become": true,
"ansible.builtin.apt": {
2024-03-20 00:09:41 +01:00
"update_cache": true,
2023-12-11 02:43:58 +01:00
"pkg": [
"apt-transport-https",
"gpg"
]
}
},
{
2023-12-16 11:33:38 +01:00
"name": "packages | keys",
2023-12-11 02:43:58 +01:00
"become": true,
"ansible.builtin.apt_key": {
"url": "https://apt.authelia.com/organization/signing.asc"
}
},
{
2023-12-16 11:33:38 +01:00
"name": "packages | repository",
2023-12-10 14:33:45 +01:00
"become": true,
"ansible.builtin.apt_repository": {
"repo": "deb https://apt.authelia.com/stable/debian/debian/ all main"
}
2023-12-11 02:43:58 +01:00
2023-12-10 14:33:45 +01:00
},
{
2023-12-16 11:33:38 +01:00
"name": "packages | installation",
2023-12-10 14:33:45 +01:00
"become": true,
"ansible.builtin.apt": {
2023-12-11 02:43:58 +01:00
"update_cache": true,
"pkg": [
"openssl",
"python3-cryptography",
2023-12-16 11:33:38 +01:00
"python3-yaml",
2023-12-10 14:33:45 +01:00
"authelia"
]
}
},
2023-12-15 15:24:51 +01:00
{
2023-12-16 11:33:38 +01:00
"name": "generate private key for signing OIDC JWTs",
"become": true,
"community.crypto.openssl_privatekey": {
"type": "RSA",
"size": 4096,
"path": "/etc/ssl/private/authelia-key.pem",
"return_content": true
},
"register": "temp_tls_result"
2023-12-15 15:24:51 +01:00
},
{
2023-12-16 11:33:38 +01:00
"name": "configuration | compose script",
2023-12-15 15:24:51 +01:00
"become": true,
"ansible.builtin.copy": {
2023-12-16 11:33:38 +01:00
"src": "conf-compose.py",
"dest": "/usr/bin/authelia-conf-compose",
"mode": "0700"
2023-12-15 15:24:51 +01:00
}
},
{
2023-12-16 11:33:38 +01:00
"name": "configuration | directories",
2023-12-15 15:24:51 +01:00
"become": true,
2023-12-16 11:33:38 +01:00
"loop": [
"/etc/authelia/conf.d",
"/etc/authelia/conf.d/clients"
],
"ansible.builtin.file": {
"state": "directory",
"path": "{{item}}"
2023-12-15 15:24:51 +01:00
}
},
2023-12-10 14:33:45 +01:00
{
2023-12-16 11:33:38 +01:00
"name": "configuration | main",
2023-12-11 02:43:58 +01:00
"become": true,
2023-12-16 11:33:38 +01:00
"ansible.builtin.template": {
"src": "conf-main.json.j2",
"dest": "/etc/authelia/conf.d/main.json"
}
2023-12-10 14:33:45 +01:00
},
2023-12-16 15:13:41 +01:00
{
"name": "configuration | compose",
"become": true,
"ansible.builtin.command": {
"cmd": "/usr/bin/authelia-conf-compose --main-file-path=/etc/authelia/conf.d/main.json --clients-directory-path=/etc/authelia/conf.d/clients --output-format=yaml --output-path=/etc/authelia/configuration.yml"
}
},
2023-12-11 02:43:58 +01:00
{
"name": "setup log directory",
"become": true,
"ansible.builtin.file": {
"state": "directory",
"path": "{{var_authelia_log_file_path | dirname}}"
}
},
{
"name": "users | directory",
2023-12-11 02:43:58 +01:00
"become": true,
"ansible.builtin.file": {
"state": "directory",
"path": "{{var_authelia_users_file_path | dirname}}"
}
},
{
"name": "users | initial file",
2023-12-11 02:43:58 +01:00
"become": true,
"ansible.builtin.template": {
"src": "users.yml.j2",
2024-03-22 00:27:57 +01:00
"dest": "{{var_authelia_users_file_path}}",
"force": false
2023-12-10 14:33:45 +01:00
}
},
{
"name": "users | management script",
"become": true,
"ansible.builtin.copy": {
"src": "user-manage.py",
"dest": "/usr/bin/authelia-user-manage",
"mode": "0700"
}
},
2023-12-10 14:33:45 +01:00
{
"name": "apply",
"become": true,
"ansible.builtin.systemd_service": {
"state": "restarted",
2024-03-21 08:03:59 +01:00
"enabled": true,
2023-12-10 14:33:45 +01:00
"name": "authelia"
2023-12-11 02:43:58 +01:00
}
2023-12-10 14:33:45 +01:00
}
]