56 lines
1.7 KiB
YAML

---
- name: "include docker-compose role"
include_role:
name: docker-compose
- name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml
- 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
when: applications.ldap.openldap.expose_to_internet | bool
- name: Remove {{domain}}.conf if LDAP is not exposed to internet
file:
path: "{{ nginx.directories.streams }}{{ domain }}.conf"
state: absent
when: not applications.ldap.openldap.expose_to_internet | bool
- name: create docker network for LDAP, so that other applications can access it
docker_network:
name: central_ldap
state: present
- 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
when: applications.ldap.webinterface == 'phpldapadmin'
- name: "create {{docker_compose.directories.env}}lam.env"
template:
src: "lam.env.j2"
dest: "{{docker_compose.directories.env}}lam.env"
mode: '770'
force: yes
notify: docker compose project setup
when: applications.ldap.webinterface == 'lam'
- name: flush docker service
meta: flush_handlers
- name: "create {{groups_ldif_host_path}}"
template:
src: "groups.ldif.j2"
dest: "{{groups_ldif_host_path}}"
mode: '770'
notify: Import missing groups to OpenLDAP