Files
ansible_role_package/tasks/pkgs/bitwarden.yml
2026-03-14 20:22:51 -06:00

54 lines
1.6 KiB
YAML

# vim: set filetype=yaml.ansible :
#
## Package: bitwarden
## Description: Desktop GUI for the bitwarden password/secrets manager
## Version: latest
## Methods:
## - flatpak
## - appimage
## Helpers:
## - flatpak
## - appimage
---
- name: Set bitwarden default facts # {{{
ansible.builtin.set_fact:
bitwarden:
install_methods:
- flatpak
- appimage
flatpak:
name: com.bitwarden.desktop
remote: flathub
method: system
appimage_url: https://bitwarden.com/download/?app=desktop&platform=linux&variant=appimage
pkg_deps:
- flatpak
- flathub
# }}}
- name: Configure bitwarden
when:
- "'bitwarden' not in __configured"
block:
- name: Set bitwarden install method
when:
- bitwarden_install_method is undefined
ansible.builtin.set_fact:
bitwarden_install_method: "{{ install_method if install_method in bitwarden.install_methods else bitwarden.install_methods[0] }}"
- name: Set flatpak install facts
when:
- bitwarden_install_method == "flatpak"
block:
- name: Set flatpak package name
ansible.builtin.set_fact:
bitwarden_flatpak:
name: "{{ bitwarden.flatpak.name }}"
remote: "{{ bitwarden.flatpak.remote }}"
method: "{{ bitwarden_flatpak_method | default(flatpak_method) }}"
- name: Finalize bitwarden configuration
when:
- "'bitwarden' not in __configured"
ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'bitwarden': bitwarden_install_method } ) }}"