Push Bitwarden enable/disable signups out to all.yml.

This commit is contained in:
David Stephens 2019-04-14 18:43:41 +01:00
parent 9f42bcc86e
commit 3e07697c8e
3 changed files with 12 additions and 5 deletions

View file

@ -11,8 +11,10 @@ Set `bitwarden_enabled: true` in your `group_vars/all.yml` file.
## Specific Configuration
Make sure you set your admin token! It is bitwarden_admin_token in `group_vars/all.yml` file. The string you put here will be the login to the admin section of your bitwarden installation (https://bitwarden.ansiblenasdomain.tld/admin). This token can be anything, but it's recommended to use a long, randomly generated string of characters, for example running: openssl rand -base64 48.
Make sure you set your admin token! It is `bitwarden_admin_token` in `group_vars/all.yml` file. The string you put here will be the login to the admin section of your bitwarden installation (https://bitwarden.ansiblenasdomain.tld/admin). This token can be anything, but it's recommended to use a long, randomly generated string of characters, for example running:
`openssl rand -base64 48`.
To create a user, you need to change a variable in ./tasks/bitwarden.yml. Set "SIGNUPS_ALLOWED" to "true", and reprovision the container. Once you have created your user, I would reccomend setting it to false and reprovisioning one more time.
To create a user, you need to set `bitwarden_allow_signups` to `true` in your `all.yml`, and re-run the playbook to reprovision the
container. Once you've created your users, set `bitwarden_allow_signups` back to `false` and run again.
There is currently an issue with websockets and this configuration; traefik does not work correctly when enabled. If this issue gets resolved, I will update the file. Until that time, please note that synchronizations between your vault and browser extensions will not be instant. You will need to force a sync or wait on the scheduled sync (approx. 1h).
For speed you can target just Bitwarden by appending `-t bitwarden` to your `ansible-playbook` command.

View file

@ -499,4 +499,9 @@ bitwarden_data_directory: "{{ docker_home }}/bitwarden"
# Keep this token secret, this is password to access admin area of your server!
# This token can be anything, but it's recommended to use a long, randomly generated string of characters,
# for example running openssl rand -base64 48
bitwarden_admin_token: qwertyuiop1234567890poiuytrewq0987654321
bitwarden_admin_token: qwertyuiop1234567890poiuytrewq0987654321
# To create a user set this to "true", and reprovision the container by re-running the ansible-nas playbook.
# Once you have created your user, set to "false" and run one more time.
# Target just Bitwarden by running: ansible-playbook -i inventory nas.yml -b -K -t bitwarden
bitwarden_allow_signups: false

View file

@ -16,7 +16,7 @@
volumes:
- "{{ bitwarden_data_directory }}:/data:rw"
env:
SIGNUPS_ALLOWED: "false"
SIGNUPS_ALLOWED: "{{ bitwarden_allow_signups }}"
ADMIN_TOKEN: "{{ bitwarden_admin_token }}"
LOG_FILE: "/data/bitwarden.log"
WEBSOCKET_ENABLED: "true"