diff --git a/defaults/main.yml b/defaults/main.yml index 0fd6a9d..512076d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -8,6 +8,11 @@ bitwardenrs_restart_policy: on-failure bitwardenrs_exposed_port: 80 bitwardenrs_exposed_ip: 127.0.0.1 bitwardenrs_extra_hosts: [] +# @var bitwardenrs_volumes_extra:example: > +# bitwardenrs_volumes_extra: +# - /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:/etc/ssl/certs/ca-certificates.crt:Z +# @end +bitwardenrs_volumes_extra: [] # @var bitwardenrs_memory_limit: $ "_unset_" # @var bitwardenrs_memory_limit:example: $ "512m" @@ -90,6 +95,11 @@ bitwardenrs_ldap_container_name: bitwardenrs_ldap bitwardenrs_ldap_version: latest bitwardenrs_ldap_image: "xoxys/bitwardenrs_ldap:{{ bitwardenrs_ldap_version }}" bitwardenrs_ldap_restart_policy: on-failure +# @var bitwardenrs_ldap_volumes_extra:example: > +# bitwardenrs_ldap_volumes_extra: +# - /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:/etc/ssl/certs/ca-certificates.crt:Z +# @end +bitwardenrs_ldap_volumes_extra: [] # @var bitwardenrs_ldap_memory_limit: $ "_unset_" # @var bitwardenrs_ldap_memory_limit:example: $ "512m" diff --git a/templates/services/compose.yml.j2 b/templates/services/compose.yml.j2 index fcb7bc7..1df0285 100644 --- a/templates/services/compose.yml.j2 +++ b/templates/services/compose.yml.j2 @@ -11,6 +11,9 @@ services: - {{ bitwardenrs_exposed_ip + ':' if bitwardenrs_exposed_ip is defined else '' }}{{ bitwardenrs_exposed_port }}:8080 volumes: - data:/app/data + {% for volume in bitwardenrs_volumes_extra %} + - {{ volume }} + {% endfor %} {% if bitwardenrs_extra_hosts | default([]) %} extra_hosts: {% for host in bitwardenrs_extra_hosts %} @@ -104,6 +107,12 @@ services: container_name: {{ bitwardenrs_ldap_container_name }} image: {{ bitwardenrs_ldap_image }} restart: {{ bitwardenrs_ldap_restart_policy }} + {% if bitwardenrs_ldap_volumes_extra %} + volumes: + {% for volume in bitwardenrs_ldap_volumes_extra %} + - {{ volume }} + {% endfor %} + {% end %} environment: - BITWARDENRS_LDAP_BITWARDEN_URL={{ bitwardenrs_ldap_bitwarden_url }} - BITWARDENRS_LDAP_BITWARDEN_ADMIN_TOKEN={{ bitwardenrs_ldap_bitwarden_admin_token }}