Default variables

Secret local storage


Path to a directory in which a relative secret directory will be created. By default, it will be relative to Ansible inventory

secret_root: '{{ inventory_dir | realpath }}'

Name of the directory which contains secrets. It will be in the form “secret” by default

secret_name: 'secret'

How many directory levels to add relative to secret_root, by default 1 level. For example, to go 2 levels up, set this variable to ‘../..’

secret_levels: '..'

Absolute path to directory with secrets. It will be configured as relative to current inventory directory. Use this variable in file and password lookups

secret: '{{ secret_root + "/" + ((secret_levels + "/")
            if secret_levels else "") + secret_name }}'

List of directories which should be present in the secret/ directory.

secret_directories: []

LDAP server admin access

secret_ldap_* variables are used by ldap_* Ansible modules to access LDAP server for the current domain with administrative privileges, by binding to the admin account with specified bind DN and password. Because these need to be provided with every task that uses ldap_* modules, variables below are used as a convenient central location.


Domain used for LDAP base DN and to select default LDAP server

secret_ldap_domain: '{{ ansible_domain }}'

LDAP server hostname / IP address which holds the database. ldap_* modules will connect to it natively, so it should be available at least from the Ansible Controller.

secret_ldap_server: '{{ "ldap." + secret_ldap_domain }}'

URI used in tasks to connect to LDAP server natively, it should be used in ldap_attr and ldap_entry tasks

secret_ldap_server_uri: '{{ "ldap://" + secret_ldap_server + "/" }}'

Enable or disable STARTTLS for encrypted communication with the LDAP server. Should always be enabled.

secret_ldap_start_tls: 'true'

LDAP Base DN used for to create bind DN

secret_ldap_basedn: '{{ "dc=" + secret_ldap_domain.split(".") | join(",dc=") }}'

LDAP administrator account

secret_ldap_admin_bind_dn: '{{ "cn=admin," + secret_ldap_basedn }}'

Path to a file in secret/ directory which stores password for specified admin account on configured LDAP server. This file will be populated by debops.slapd role if a server is configured with it.

secret_ldap_admin_password: '{{ secret + "/ldap/" + ansible_domain + "/credentials/" + secret_ldap_server + "/" + secret_ldap_admin_bind_dn + ".password" }}'

LDAP administrator password

secret_ldap_admin_bind_pw: '{{ lookup("password", secret_ldap_admin_password) }}'

Each LDAP administrative task should be delegated to either localhost (Ansible Controller), or to the LDAP server itself. This host will have access to LDAP admin password, and requires installed python-ldap package.

secret_ldap_delegate_to: 'localhost'

Access through sudo is not required on localhost, but if LDAP tasks are delegated to different hosts, it might be required there.

secret_ldap_sudo: False

Base for LDAP service accounts. For example GitLab uses “cn=gitlab,”+ secret_ldap_services_dn

secret_ldap_services_dn: '{{ "ou=Services," + secret_ldap_basedn }}'