2019-04-10 12:46:47 +00:00
|
|
|
- name: Create Bitwarden Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- "{{ bitwarden_data_directory }}"
|
|
|
|
|
|
|
|
- name: Bitwarden Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: bitwarden
|
|
|
|
image: mprasil/bitwarden:latest
|
|
|
|
pull: true
|
|
|
|
ports:
|
2019-04-10 13:08:06 +00:00
|
|
|
- "19080:80"
|
2019-04-10 12:46:47 +00:00
|
|
|
- "3012:3012"
|
|
|
|
volumes:
|
|
|
|
- "{{ bitwarden_data_directory }}:/data:rw"
|
|
|
|
env:
|
2019-04-14 17:43:41 +00:00
|
|
|
SIGNUPS_ALLOWED: "{{ bitwarden_allow_signups }}"
|
2019-04-10 14:28:35 +00:00
|
|
|
ADMIN_TOKEN: "{{ bitwarden_admin_token }}"
|
2019-04-10 12:46:47 +00:00
|
|
|
LOG_FILE: "/data/bitwarden.log"
|
2019-04-14 15:45:48 +00:00
|
|
|
WEBSOCKET_ENABLED: "true"
|
2019-04-10 12:46:47 +00:00
|
|
|
labels:
|
|
|
|
traefik.web.frontend.rule: "Host:bitwarden.{{ ansible_nas_domain }}"
|
2019-04-14 16:05:21 +00:00
|
|
|
traefik.enable: "{{ bitwarden_available_externally }}"
|
2019-04-10 12:46:47 +00:00
|
|
|
traefik.web.port: "80"
|
2019-04-14 15:45:48 +00:00
|
|
|
traefik.hub.frontend.rule: "Host:bitwarden.{{ ansible_nas_domain }};Path:/notifications/hub"
|
|
|
|
traefik.hub.port: "3012"
|
|
|
|
traefik.hub.protocol: "ws"
|
2019-04-10 12:46:47 +00:00
|
|
|
restart_policy: unless-stopped
|
|
|
|
#memory: 1g
|
|
|
|
|
|
|
|
- name: Bitwarden Backup Container
|
|
|
|
docker_container:
|
|
|
|
name: bitwarden-backup
|
|
|
|
image: bruceforce/bw_backup:latest
|
|
|
|
pull: true
|
|
|
|
restart_policy: unless-stopped
|
2019-04-10 20:55:14 +00:00
|
|
|
volumes_from: bitwarden
|
2019-08-21 19:45:30 +00:00
|
|
|
memory: 1g
|