Skip to content

guerzon/ansible-role-vaultwarden

Repository files navigation

ansible-role-vaultwarden

Lint and Test Release

Install and manage your Vaultwarden instances using Ansible.

Requirements

None

Role Variables

Refer to the defaults file (defaults/main.yml) for the complete details. The following is an example configuration.

Specify the web vault and API server versions, and run Vaultwarden as a specific user:

web_vault_version: "2024.6.2c-1.7"
api_server_version: "1.32.2-2.2"
appuser: "vault"

Specify the database settings:

database_url: "postgresql://appuser:SecurePassword@192.168.100.100/vaultwardenprod"

Configure push notifications:

push_enabled: "true"
push_installation_id: "CHANGEME"
push_installation_key: "CHANGEME"

General settings:

domain: "https://pass.homelabnet.lcl"
signups_allowed: "true"
signups_verify: "true"
signups_domains_whitelist: "homelabnet.lcl"
invitations_allowed: "true"
invitation_org_name: "HomeLab Corp"

Advanced settings:

admin_token: "CHANGEME"
disable_admin_token: "false"

Ensure emails are sent:

smtp_host: "smtp.gmail.com"
smtp_from: "vaultadmin@homelabnet.lcl"
smtp_from_name: "Vault Administrator"
smtp_username: "tadmin@homelabnet.lcl"
smtp_password: "SecurePassword"
smtp_security: "starttls"

Set custom listening port:

rocket_port: "5000"

Dependencies

None

Example Playbook

Minimal installation example using a SQLite database:

- hosts: all
  roles:
    - vaultwarden

Specify the domain name and custom Rocket port:

- hosts: all
  vars:
    domain: "https://vaultwarden.homelabnet.lcl"
    rocket_port: "8000"
  roles:
    - vaultwarden

Supported Platforms

Currently, the following are supported. Additional distros will be supported in the future.

  • Red Hat Enterprise Linux 9
  • Rocky Linux 9
  • Fedora 40

License

MIT

Author Information

This Ansible role is managed by Lester Guerzon.