dotfiles/roles/user/secrets/bw/tasks/main.yml
Matej Focko 2d8f1f7f36
fix(user/bw): directories must be executable
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-07-01 21:58:39 +02:00

31 lines
798 B
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_user }}"
- name: Create directories for different Bitwarden accounts
ansible.builtin.file:
path: "~/.config/Bitwarden CLI/{{ item }}"
state: directory
mode: 0700
owner: "{{ target_user }}"
group: "{{ target_user }}"
loop:
- vault.bitwarden.com
- vault.mfocko.xyz