82 lines
3.1 KiB
Django/Jinja
82 lines
3.1 KiB
Django/Jinja
#jinja2:lstrip_blocks: True
|
|
{{ ansible_managed | comment }}
|
|
version: "2.4"
|
|
|
|
services:
|
|
vaultwarden_ldap:
|
|
container_name: {{ vaultwarden_ldap_container_name }}
|
|
image: {{ vaultwarden_ldap_image }}
|
|
restart: {{ vaultwarden_ldap_restart_policy }}
|
|
{% if vaultwarden_ldap_volumes | default([]) %}
|
|
volumes:
|
|
{% for volume in vaultwarden_ldap_volumes %}
|
|
- "{{ volume.name }}:{{ volume.dest }}"
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if vaultwarden_ldap_networks_applied | default([]) %}
|
|
networks:
|
|
{% for network in vaultwarden_ldap_networks_applied %}
|
|
- {{ network }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
environment:
|
|
- VAULTWARDEN_LDAP_VAULTWARDEN_URL={{ vaultwarden_ldap_vaultwarden_url }}
|
|
- VAULTWARDEN_LDAP_VAULTWARDEN_ADMIN_TOKEN={{ vaultwarden_ldap_vaultwarden_admin_token }}
|
|
- VAULTWARDEN_LDAP_HOST={{ vaultwarden_ldap_host }}
|
|
{% if vaultwarden_ldap_scheme is defined and vaultwarden_ldap_scheme %}
|
|
- VAULTWARDEN_LDAP_SCHEME={{ vaultwarden_ldap_scheme }}
|
|
{% endif %}
|
|
- VAULTWARDEN_LDAP_SSL={{ vaultwarden_ldap_ssl }}
|
|
{% if vaultwarden_ldap_port is defined and vaultwarden_ldap_port %}
|
|
- VAULTWARDEN_LDAP_PORT={{ vaultwarden_ldap_port }}
|
|
{% endif %}
|
|
- VAULTWARDEN_LDAP_BIND_DN={{ vaultwarden_ldap_bind_dn }}
|
|
- VAULTWARDEN_LDAP_BIND_PASSWORD={{ vaultwarden_ldap_bind_password }}
|
|
- VAULTWARDEN_LDAP_SEARCH_BASE_DN={{ vaultwarden_ldap_search_base_dn }}
|
|
- VAULTWARDEN_LDAP_SEARCH_FILTER={{ vaultwarden_ldap_search_filter }}
|
|
- VAULTWARDEN_LDAP_MAIL_FIELD={{ vaultwarden_ldap_mail_field }}
|
|
- VAULTWARDEN_LDAP_SYNC_INTERVAL_SECONDS={{ vaultwarden_ldap_sync_interval_seconds }}
|
|
- VAULTWARDEN_LDAP_SYNC_LOOP={{ vaultwarden_ldap_sync_loop }}
|
|
{% if vaultwarden_ldap_memory_limit is defined %}
|
|
mem_limit: {{ vaultwarden_ldap_memory_limit }}
|
|
{% endif %}
|
|
{% if vaultwarden_ldap_memory_reservation is defined %}
|
|
mem_reservation: {{ vaultwarden_ldap_memory_reservation }}
|
|
{% endif %}
|
|
{% if vaultwarden_ldap_cpu_shares is defined %}
|
|
cpu_shares: {{ vaultwarden_ldap_cpu_shares }}
|
|
{% endif %}
|
|
{% if not vaultwarden_ldap_cap_add | length == 0 %}
|
|
cap_add:
|
|
{% for item in vaultwarden_ldap_cap_add %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if not vaultwarden_ldap_cap_drop | length == 0 %}
|
|
cap_drop:
|
|
{% for item in vaultwarden_ldap_cap_drop %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if not vaultwarden_ldap_security_opt | length == 0 %}
|
|
security_opt:
|
|
{% for item in vaultwarden_ldap_security_opt %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if vaultwarden_ldap_pids_limit is defined %}
|
|
pids_limit: {{ vaultwarden_ldap_pids_limit }}
|
|
{% endif %}
|
|
{% if vaultwarden_ldap_networks | default([]) | length > 0 %}
|
|
|
|
networks:
|
|
{% for network in vaultwarden_ldap_networks %}
|
|
{{ network.name }}:
|
|
{% if network.external | default(False) | bool %}
|
|
external: true
|
|
{% else %}
|
|
driver: {{ network.backend | default("bridge") }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|