Vaultwarden: Add email support.
This commit is contained in:
parent
03cf2817a4
commit
a0a7dfbaf6
3 changed files with 15 additions and 4 deletions
|
@ -3,13 +3,16 @@
|
|||
path: "{{ vaultwarden_project_dir }}"
|
||||
state: directory
|
||||
|
||||
- name: Template docker-compose.yaml to project directory
|
||||
- name: Template docker-compose.yaml & .env to project directory
|
||||
template:
|
||||
src: docker-compose.yaml
|
||||
dest: "{{ vaultwarden_project_dir }}/docker-compose.yaml"
|
||||
src: "{{ item }}"
|
||||
dest: "{{ vaultwarden_project_dir }}/{{ item }}"
|
||||
owner: "{{ ansible_env['USER'] }}"
|
||||
group: "{{ ansible_env['USER'] }}"
|
||||
mode: '640'
|
||||
loop:
|
||||
- docker-compose.yaml
|
||||
- .env
|
||||
|
||||
- name: "Create directory {{ volumes['vaultwarden_datadir'] }} with correct permissions"
|
||||
file:
|
||||
|
|
2
roles/vaultwarden/templates/.env
Normal file
2
roles/vaultwarden/templates/.env
Normal file
|
@ -0,0 +1,2 @@
|
|||
ADMIN_TOKEN='{{ vaultwarden_secrets["admin_token_hash"] }}'
|
||||
SMTP_PASSWORD='{{ vaultwarden_secrets["smtp_password"] }}'
|
|
@ -7,7 +7,13 @@ services:
|
|||
environment:
|
||||
- DOMAIN=https://vw.{{ domain }}
|
||||
- SIGNUPS_ALLOWED=false
|
||||
- ADMIN_TOKEN={{ vaultwarden_secrets['admin_token_hash'] | regex_replace('\$', '$$') }}
|
||||
- ADMIN_TOKEN=${ADMIN_TOKEN}
|
||||
- SMTP_HOST=mail.{{ domain }}
|
||||
- SMTP_FROM=vaultwarden@{{ domain }}
|
||||
- SMTP_PORT={{ ports['mailserver_smtps'] }}
|
||||
- SMTP_SECURITY=force_tls
|
||||
- SMTP_USERNAME={{ vaultwarden_secrets['smtp_username'] }}
|
||||
- SMTP_PASSWORD=${SMTP_PASSWORD}
|
||||
ports:
|
||||
- 127.0.0.1:{{ ports['vaultwarden'] }}:80
|
||||
volumes:
|
||||
|
|
Loading…
Reference in a new issue