Robert Kaussow
0f33b8945b
All checks were successful
continuous-integration/drone/push Build is passing
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:
|
|
bitwardenrs_ldap:
|
|
container_name: {{ bitwardenrs_ldap_container_name }}
|
|
image: {{ bitwardenrs_ldap_image }}
|
|
restart: {{ bitwardenrs_ldap_restart_policy }}
|
|
{% if bitwardenrs_ldap_volumes | default([]) %}
|
|
volumes:
|
|
{% for volume in bitwardenrs_ldap_volumes %}
|
|
- "{{ volume.name }}:{{ volume.dest }}"
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if bitwardenrs_ldap_networks_applied | default([]) %}
|
|
networks:
|
|
{% for network in bitwardenrs_ldap_networks_applied %}
|
|
- {{ network }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
environment:
|
|
- BITWARDENRS_LDAP_BITWARDEN_URL={{ bitwardenrs_ldap_bitwarden_url }}
|
|
- BITWARDENRS_LDAP_BITWARDEN_ADMIN_TOKEN={{ bitwardenrs_ldap_bitwarden_admin_token }}
|
|
- BITWARDENRS_LDAP_HOST={{ bitwardenrs_ldap_host }}
|
|
{% if bitwardenrs_ldap_scheme is defined and bitwardenrs_ldap_scheme %}
|
|
- BITWARDENRS_LDAP_SCHEME={{ bitwardenrs_ldap_scheme }}
|
|
{% endif %}
|
|
- BITWARDENRS_LDAP_SSL={{ bitwardenrs_ldap_ssl }}
|
|
{% if bitwardenrs_ldap_port is defined and bitwardenrs_ldap_port %}
|
|
- BITWARDENRS_LDAP_PORT={{ bitwardenrs_ldap_port }}
|
|
{% endif %}
|
|
- BITWARDENRS_LDAP_BIND_DN={{ bitwardenrs_ldap_bind_dn }}
|
|
- BITWARDENRS_LDAP_BIND_PASSWORD={{ bitwardenrs_ldap_bind_password }}
|
|
- BITWARDENRS_LDAP_SEARCH_BASE_DN={{ bitwardenrs_ldap_search_base_dn }}
|
|
- BITWARDENRS_LDAP_SEARCH_FILTER={{ bitwardenrs_ldap_search_filter }}
|
|
- BITWARDENRS_LDAP_MAIL_FIELD={{ bitwardenrs_ldap_mail_field }}
|
|
- BITWARDENRS_LDAP_SYNC_INTERVAL_SECONDS={{ bitwardenrs_ldap_sync_interval_seconds }}
|
|
- BITWARDENRS_LDAP_SYNC_LOOP={{ bitwardenrs_ldap_sync_loop }}
|
|
{% if bitwardenrs_ldap_memory_limit is defined %}
|
|
mem_limit: {{ bitwardenrs_ldap_memory_limit }}
|
|
{% endif %}
|
|
{% if bitwardenrs_ldap_memory_reservation is defined %}
|
|
mem_reservation: {{ bitwardenrs_ldap_memory_reservation }}
|
|
{% endif %}
|
|
{% if bitwardenrs_ldap_cpu_shares is defined %}
|
|
cpu_shares: {{ bitwardenrs_ldap_cpu_shares }}
|
|
{% endif %}
|
|
{% if not bitwardenrs_ldap_cap_add | length == 0 %}
|
|
cap_add:
|
|
{% for item in bitwardenrs_ldap_cap_add %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if not bitwardenrs_ldap_cap_drop | length == 0 %}
|
|
cap_drop:
|
|
{% for item in bitwardenrs_ldap_cap_drop %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if not bitwardenrs_ldap_security_opt | length == 0 %}
|
|
security_opt:
|
|
{% for item in bitwardenrs_ldap_security_opt %}
|
|
- {{ item }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if bitwardenrs_ldap_pids_limit is defined %}
|
|
pids_limit: {{ bitwardenrs_ldap_pids_limit }}
|
|
{% endif %}
|
|
{% if bitwardenrs_ldap_networks | default([]) | length > 0 %}
|
|
|
|
networks:
|
|
{% for network in bitwardenrs_ldap_networks %}
|
|
{{ network.name }}:
|
|
{% if network.external | default(False) | bool %}
|
|
external: true
|
|
{% else %}
|
|
driver: {{ network.backend | default("bridge") }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|