main.ymlΒΆ

---
application_id: "svc-db-openldap"
entity_name: "{{ application_id | entity_name }}"

OPENLDAP_PORT: "{{ lookup('config', application_id, 'services.openldap.ports.local.ldap') }}"
OPENLDAP_SERVER_URI: "ldap://{{ DOCKER_REACH_HOST }}:{{ OPENLDAP_PORT }}"

OPENLDAP_CONFIG_URI: "ldapi:///"

OPENLDAP_LDIF_PATH_HOST: "{{ lookup('container', application_id, 'directories.volumes') }}ldif/"
OPENLDAP_LDIF_PATH_DOCKER: "/tmp/ldif/"
OPENLDAP_LDIF_TYPES:
  - configuration
  - groups

OPENLDAP_CONTAINER: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.name') }}"
OPENLDAP_CONTAINER_ADDRESS: "{{ lookup('container_address', application_id, entity_name) }}"
OPENLDAP_IMAGE: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.image') }}"
OPENLDAP_VERSION: "{{ lookup('config', application_id, 'services.' ~ entity_name ~ '.version') }}"
OPENLDAP_SERVICE: "{{ entity_name }}"
OPENLDAP_BIND_DN: "{{ LDAP.DN.ADMINISTRATOR.DATA }}"
OPENLDAP_BIND_PW: "{{ LDAP.BIND_CREDENTIAL }}"
OPENLDAP_LDAPSM_COMMAND: |-
  {{ ansible_python_interpreter }} -c 'import sys; from ldapsm.__main__ import main; sys.argv = ["ldapsm", *sys.argv[1:], "-W", sys.stdin.readline().rstrip("\n")]; sys.exit(main())'

OPENLDAP_NETWORK_SWITCH_PUBLIC: "{{ lookup('config', application_id, 'services.openldap.network.public') }}"
OPENLDAP_NETWORK_SWITCH_LOCAL: "{{ lookup('config', application_id, 'services.openldap.network.local') }}"
OPENLDAP_EXPOSED: "{{ lookup('config', application_id, 'services.openldap.exposed') | bool }}"
OPENLDAP_NETWORK_EXPOSE_LOCAL: "{{ OPENLDAP_NETWORK_SWITCH_PUBLIC | bool or OPENLDAP_NETWORK_SWITCH_LOCAL | bool or OPENLDAP_EXPOSED | bool }}"

OPENLDAP_PROVISION_CONFIGURATION: "{{ lookup('config', application_id, 'services.openldap.provision.configuration') }}"
OPENLDAP_PROVISION_CREDENTIALS: "{{ lookup('config', application_id, 'services.openldap.provision.credentials') }}"
OPENLDAP_PROVISION_SCHEMAS: "{{ lookup('config', application_id, 'services.openldap.provision.schemas') }}"
OPENLDAP_PROVISION_USERS: "{{ lookup('config', application_id, 'services.openldap.provision.users') }}"
OPENLDAP_PROVISION_GROUPS: "{{ lookup('config', application_id, 'services.openldap.provision.groups') }}"
OPENLDAP_PROVISION_UPDATE: "{{ lookup('config', application_id, 'services.openldap.provision.update') }}"
OPENLDAP_USERS: "{{ lookup('users_non_reserved') }}"

OPENLDAP_PYTHON_HEADER_PACKAGE_TEMPLATES_BY_OS_FAMILY:
  Debian:
    - python__PY_MM__-dev
    - python3-dev
  RedHat:
    - python__PY_MM__-devel
    - python__PY_MM_NODOT__-devel
    - python3-devel
  Archlinux:
    - python