- Update Authelia configuration template for OIDC and access control - Enhance Authelia deployment tasks - Update LLDAP deployment tasks
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
---
|
|
- name: Read LLDAP admin password
|
|
set_fact:
|
|
lldap_admin_password: "{{ LLDAP_ADMIN_PASSWORD | default(lookup('env', 'LLDAP_ADMIN_PASSWORD')) }}"
|
|
no_log: true
|
|
|
|
- name: Fail if LLDAP admin password is missing
|
|
fail:
|
|
msg: "LLDAP_ADMIN_PASSWORD is required"
|
|
when: lldap_admin_password | length == 0
|
|
|
|
- name: Read LLDAP JWT secret
|
|
set_fact:
|
|
lldap_jwt_secret: "{{ LLDAP_JWT_SECRET | default(lookup('env', 'LLDAP_JWT_SECRET')) }}"
|
|
no_log: true
|
|
|
|
- name: Fail if LLDAP JWT secret is missing
|
|
fail:
|
|
msg: "LLDAP_JWT_SECRET is required"
|
|
when: lldap_jwt_secret | length == 0
|
|
|
|
- name: Read LLDAP key seed
|
|
set_fact:
|
|
lldap_key_seed: "{{ LLDAP_KEY_SEED | default(lookup('env', 'LLDAP_KEY_SEED')) }}"
|
|
no_log: true
|
|
|
|
- name: Fail if LLDAP key seed is missing
|
|
fail:
|
|
msg: "LLDAP_KEY_SEED is required"
|
|
when: lldap_key_seed | length == 0
|
|
|
|
- name: Create LLDAP directory
|
|
file:
|
|
path: /opt/lldap
|
|
state: directory
|
|
|
|
- name: Ensure proxy network exists
|
|
command: docker network inspect proxy
|
|
register: lldap_proxy_network
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Create proxy network if missing
|
|
command: docker network create proxy
|
|
when: lldap_proxy_network.rc != 0
|
|
|
|
- name: Copy Docker Compose file for LLDAP
|
|
template:
|
|
src: docker-compose.yml.j2
|
|
dest: /opt/lldap/docker-compose.yml
|
|
|
|
- name: Deploy LLDAP
|
|
command: docker compose up -d
|
|
args:
|
|
chdir: /opt/lldap
|