homelab/roles/openldap/tasks/main.yml

28 lines
715 B
YAML
Raw Normal View History

2021-05-16 20:55:22 +00:00
- name: ensure directories exist
file:
path: "{{ item }}"
state: directory
mode: '0755'
loop:
- "{{ data_folder }}/openldap"
- "{{ data_folder }}/openldap/data"
- name: run container
docker_container:
name: "openldap"
image: osixia/openldap
command: "--loglevel debug"
2021-06-20 16:18:21 +00:00
hostname: openldap
2021-05-16 20:55:22 +00:00
networks:
- name: nginx-internal
ports:
- "389:389"
- "636:636"
volumes:
- "{{ data_folder }}/openldap/data:/var/lib/ldap"
env:
LDAP_ORGANISATION: "Homelab"
LDAP_DOMAIN: "kucharczyk.xyz"
2021-06-20 16:16:10 +00:00
LDAP_ADMIN_PASSWORD: "{{ vault_openldap_admin_password }}"
2021-05-16 21:46:45 +00:00
LDAP_REMOVE_CONFIG_AFTER_SETUP: "false"
2021-05-16 20:55:22 +00:00
state: started
restart: yes