Skip to content

Commit

Permalink
add configuration options for bitwarden role
Browse files Browse the repository at this point in the history
configure DOMAIN for U2F
  • Loading branch information
d-rk committed Apr 7, 2021
1 parent f08dbd9 commit a20686b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions roles/bitwarden/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ bitwarden_admin_token: qwertyuiop1234567890poiuytrewq0987654321
# Target just Bitwarden by running: ansible-playbook -i inventory nas.yml -b -K -t bitwarden
bitwarden_allow_signups: false

## Domain settings
## The domain must match the address from where you access the server
## It's recommended to configure this value, otherwise certain functionality might not work,
## like attachment downloads, email links and U2F.
## For U2F to work, the server must use HTTPS, you can use Let's Encrypt for free certs
bitwarden_domain: https://{{ bitwarden_hostname }}.{{ ansible_nas_domain }}

# specs
bitwarden_memory: 1g
bitwarden_backup_memory: 1g

# uid / gid
bitwarden_user_id: "0"
bitwarden_group_id: "0"

# Set to true to append timestamp to the BACKUP_FILE
bitwarden_backup_timestamp: "false"
8 changes: 8 additions & 0 deletions roles/bitwarden/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
env:
SIGNUPS_ALLOWED: "{{ bitwarden_allow_signups }}"
ADMIN_TOKEN: "{{ bitwarden_admin_token }}"
DOMAIN: "{{ bitwarden_domain }}"
LOG_FILE: "/data/bitwarden.log"
WEBSOCKET_ENABLED: "true"
labels:
Expand All @@ -38,4 +39,11 @@
pull: true
restart_policy: unless-stopped
volumes_from: bitwarden
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
env:
TIMESTAMP: "{{ bitwarden_backup_timestamp }}"
UID: "{{ bitwarden_user_id }}"
GID: "{{ bitwarden_group_id }}"
memory: "{{ bitwarden_backup_memory }}"

0 comments on commit a20686b

Please sign in to comment.