Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add configuration options for bitwarden role #445

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}"