dotfiles/roles/secrets_bw/tasks/main.yml
Matej Focko fa5339e1c1
chore: rename ‹secrets› group of roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-12 16:53:02 +01:00

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