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 }}"
|
path: "{{ vaultwarden_project_dir }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Template docker-compose.yaml to project directory
|
- name: Template docker-compose.yaml & .env to project directory
|
||||||
template:
|
template:
|
||||||
src: docker-compose.yaml
|
src: "{{ item }}"
|
||||||
dest: "{{ vaultwarden_project_dir }}/docker-compose.yaml"
|
dest: "{{ vaultwarden_project_dir }}/{{ item }}"
|
||||||
owner: "{{ ansible_env['USER'] }}"
|
owner: "{{ ansible_env['USER'] }}"
|
||||||
group: "{{ ansible_env['USER'] }}"
|
group: "{{ ansible_env['USER'] }}"
|
||||||
mode: '640'
|
mode: '640'
|
||||||
|
loop:
|
||||||
|
- docker-compose.yaml
|
||||||
|
- .env
|
||||||
|
|
||||||
- name: "Create directory {{ volumes['vaultwarden_datadir'] }} with correct permissions"
|
- name: "Create directory {{ volumes['vaultwarden_datadir'] }} with correct permissions"
|
||||||
file:
|
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:
|
environment:
|
||||||
- DOMAIN=https://vw.{{ domain }}
|
- DOMAIN=https://vw.{{ domain }}
|
||||||
- SIGNUPS_ALLOWED=false
|
- 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:
|
ports:
|
||||||
- 127.0.0.1:{{ ports['vaultwarden'] }}:80
|
- 127.0.0.1:{{ ports['vaultwarden'] }}:80
|
||||||
volumes:
|
volumes:
|
||||||
|
|
Loading…
Reference in a new issue