37 lines
1 KiB
YAML
37 lines
1 KiB
YAML
---
|
|
- name: Download the latest release
|
|
ansible.builtin.unarchive:
|
|
src: https://vault.bitwarden.com/download/?app=cli&platform=linux
|
|
dest: ~/.local/bin/
|
|
remote_src: yes
|
|
creates: ~/.local/bin/bw
|
|
|
|
- name: Make it executable
|
|
ansible.builtin.file:
|
|
path: ~/.local/bin/bw
|
|
mode: u+x
|
|
|
|
- name: Create directory for Bitwarden accounts
|
|
ansible.builtin.file:
|
|
path: "~/.config/Bitwarden CLI"
|
|
state: directory
|
|
mode: 0700
|
|
owner: "{{ target_user }}"
|
|
group: "{{ target_group }}"
|
|
|
|
- name: Create directories for public Bitwarden instance
|
|
ansible.builtin.file:
|
|
path: "~/.config/Bitwarden CLI/vault.bitwarden.com"
|
|
state: directory
|
|
mode: 0700
|
|
owner: "{{ target_user }}"
|
|
group: "{{ target_group }}"
|
|
|
|
- name: Create directory for the self-hosted Vaultwarden instance
|
|
ansible.builtin.file:
|
|
path: "~/.config/Bitwarden CLI/{{ vaultwarden_address }}"
|
|
state: directory
|
|
mode: 0700
|
|
owner: "{{ target_user }}"
|
|
group: "{{ target_group }}"
|
|
when: vaultwarden_address
|