63 lines
1.8 KiB
YAML
Raw Normal View History

2025-01-21 16:50:43 +01:00
---
2025-01-29 14:20:34 +01:00
- name: "include docker-compose role"
include_role:
name: docker-compose
2025-01-21 16:50:43 +01:00
- name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml
2025-01-29 14:20:34 +01:00
- name: Create {{domain}}.conf if LDAP is exposed to internet
template:
src: "nginx.stream.conf.j2"
dest: "{{nginx.directories.streams}}{{domain}}.conf"
notify: restart nginx
2025-02-12 12:41:13 +01:00
when: applications.ldap.openldap.network.public | bool
2025-01-29 14:20:34 +01:00
- name: Remove {{domain}}.conf if LDAP is not exposed to internet
file:
path: "{{ nginx.directories.streams }}{{ domain }}.conf"
2025-01-29 14:20:34 +01:00
state: absent
2025-02-12 12:41:13 +01:00
when: not applications.ldap.openldap.network.public | bool
- name: create docker network for LDAP, so that other applications can access it
docker_network:
name: central_ldap
state: present
2025-02-06 23:59:53 +01:00
- name: "copy docker-compose.yml and env file"
include_tasks: copy-docker-compose-and-env.yml
- name: "create {{docker_compose.directories.env}}phpldapadmin.env"
template:
src: "phpldapadmin.env.j2"
dest: "{{docker_compose.directories.env}}phpldapadmin.env"
mode: '770'
force: yes
notify: docker compose project setup
2025-02-06 16:27:00 +01:00
when: applications.ldap.webinterface == 'phpldapadmin'
2025-01-21 16:50:43 +01:00
- name: "create {{docker_compose.directories.env}}lam.env"
2025-01-21 16:50:43 +01:00
template:
src: "lam.env.j2"
dest: "{{docker_compose.directories.env}}lam.env"
mode: '770'
force: yes
2025-02-06 16:27:00 +01:00
notify: docker compose project setup
2025-02-11 16:19:08 +01:00
when: applications.ldap.webinterface == 'lam'
- name: flush docker service
meta: flush_handlers
2025-02-11 18:09:26 +01:00
- name: "create directory {{ldif_host_path}}"
file:
path: "{{ldif_host_path}}"
state: directory
mode: 0755
- name: "Create LDIF files at {{ldif_host_path}}"
2025-02-11 16:19:08 +01:00
template:
2025-02-11 18:09:26 +01:00
src: "templates/ldif/{{item}}.j2"
dest: "{{ldif_host_path}}{{item}}"
2025-02-11 16:19:08 +01:00
mode: '770'
2025-02-11 18:09:26 +01:00
notify: Import missing groups to OpenLDAP
loop: "{{ldif_files}}"