Move openldap to volume mounts

This commit is contained in:
Jesper Hess 2019-03-04 18:21:14 +01:00
parent 2f413b3e99
commit 55c8e77254
Signed by untrusted user: graffen
GPG key ID: 351A89E40D763F0F
2 changed files with 14 additions and 3 deletions

View file

@ -3,6 +3,7 @@ nginx:
ldap:
domain: "ldap.{{ base_domain }}"
volume_folder: "{{ volume_root_folder }}/openldap"
thelounge:
domain: "irc.{{ base_domain }}"

View file

@ -1,4 +1,14 @@
---
- name: create ldap volume folders
file:
name: "{{ ldap.volume_folder }}/{{ volume }}"
state: directory
loop:
- "var/lib/ldap"
- "etc/slapd"
- "certs"
loop_control:
loop_var: volume
- name: Create a network for ldap
docker_network:
@ -11,9 +21,9 @@
tty: true
interactive: true
volumes:
- /var/lib/ldap
- /etc/ldap/slapd.d
- /container/service/slapd/assets/certs/
- "{{ ldap.volume_folder }}/var/lib/ldap:/var/lib/ldap"
- "{{ ldap.volume_folder }}/etc/slapd.d:/etc/ldap/slapd.d"
- "{{ ldap.volume_folder }}/certs:/container/service/slapd/assets/certs/"
published_ports:
- "389:389"
- "636:636"