diff --git a/docs/applications/bitwarden.md b/docs/applications/bitwarden.md index f806bebf..4511bac9 100644 --- a/docs/applications/bitwarden.md +++ b/docs/applications/bitwarden.md @@ -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). \ No newline at end of file +For speed you can target just Bitwarden by appending `-t bitwarden` to your `ansible-playbook` command. \ No newline at end of file diff --git a/group_vars/all.yml.dist b/group_vars/all.yml.dist index a1138000..1a8e9bf4 100644 --- a/group_vars/all.yml.dist +++ b/group_vars/all.yml.dist @@ -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 \ No newline at end of file +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 diff --git a/tasks/bitwarden.yml b/tasks/bitwarden.yml index a362f005..fb28a029 100644 --- a/tasks/bitwarden.yml +++ b/tasks/bitwarden.yml @@ -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"