136 lines
2.8 KiB
JSON
136 lines
2.8 KiB
JSON
[
|
|
{
|
|
"when": false,
|
|
"name": "prepare package installation 1",
|
|
"become": true,
|
|
"ansible.builtin.apt": {
|
|
"pkg": [
|
|
"apt-transport-https",
|
|
"gpg"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"when": false,
|
|
"name": "prepare package installation 2",
|
|
"become": true,
|
|
"ansible.builtin.apt_key": {
|
|
"url": "https://apt.authelia.com/organization/signing.asc"
|
|
}
|
|
},
|
|
{
|
|
"when": false,
|
|
"name": "prepare package installation 3",
|
|
"become": true,
|
|
"ansible.builtin.apt_repository": {
|
|
"repo": "deb https://apt.authelia.com/stable/debian/debian/ all main"
|
|
}
|
|
|
|
},
|
|
{
|
|
"when": false,
|
|
"name": "install packages",
|
|
"become": true,
|
|
"ansible.builtin.apt": {
|
|
"update_cache": true,
|
|
"pkg": [
|
|
"openssl",
|
|
"python3-cryptography",
|
|
"authelia"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "download",
|
|
"delegate_to": "localhost",
|
|
"ansible.builtin.get_url": {
|
|
"url": "https://github.com/authelia/authelia/releases/download/v{{var_authelia_version}}/authelia-v{{var_authelia_version}}-linux-{{var_authelia_variant}}.tar.gz",
|
|
"dest": "/tmp/authelia.tar.gz"
|
|
}
|
|
},
|
|
{
|
|
"name": "unpack | preparation",
|
|
"delegate_to": "localhost",
|
|
"ansible.builtin.file": {
|
|
"state": "directory",
|
|
"dest": "/tmp/authelia"
|
|
}
|
|
},
|
|
{
|
|
"name": "unpack | execution",
|
|
"delegate_to": "localhost",
|
|
"ansible.builtin.unarchive": {
|
|
"src": "/tmp/authelia.tar.gz",
|
|
"dest": "/tmp/authelia"
|
|
}
|
|
},
|
|
{
|
|
"name": "setup binary",
|
|
"become": true,
|
|
"ansible.builtin.copy": {
|
|
"src": "/tmp/authelia/authelia-linux-{{var_authelia_variant}}",
|
|
"dest": "/usr/bin/authelia",
|
|
"mode": "0744"
|
|
}
|
|
},
|
|
{
|
|
"name": "systemd unit",
|
|
"become": true,
|
|
"ansible.builtin.template": {
|
|
"src": "systemd-unit.j2",
|
|
"dest": "/etc/systemd/system/authelia.service"
|
|
}
|
|
},
|
|
{
|
|
"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"
|
|
},
|
|
{
|
|
"name": "emplace configuration",
|
|
"become": true,
|
|
"ansible.builtin.template": {
|
|
"src": "configuration.yml.j2",
|
|
"dest": "/etc/authelia/configuration.yml"
|
|
}
|
|
},
|
|
{
|
|
"name": "setup log directory",
|
|
"become": true,
|
|
"ansible.builtin.file": {
|
|
"state": "directory",
|
|
"path": "{{var_authelia_log_file_path | dirname}}"
|
|
}
|
|
},
|
|
{
|
|
"name": "setup users directory",
|
|
"become": true,
|
|
"ansible.builtin.file": {
|
|
"state": "directory",
|
|
"path": "{{var_authelia_users_file_path | dirname}}"
|
|
}
|
|
},
|
|
{
|
|
"name": "place dummy user file",
|
|
"become": true,
|
|
"ansible.builtin.template": {
|
|
"src": "users.yml.j2",
|
|
"dest": "{{var_authelia_users_file_path}}"
|
|
}
|
|
},
|
|
{
|
|
"name": "apply",
|
|
"become": true,
|
|
"ansible.builtin.systemd_service": {
|
|
"enabled": true,
|
|
"state": "restarted",
|
|
"name": "authelia"
|
|
}
|
|
}
|
|
]
|