From 42aeacb47b5114859d8005f1ea4fff31687e399a Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Fri, 12 Jul 2024 14:56:07 +0200 Subject: [PATCH] fix(secrets/bw): use correct variables Signed-off-by: Matej Focko --- roles/user/secrets/bw/tasks/main.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/roles/user/secrets/bw/tasks/main.yml b/roles/user/secrets/bw/tasks/main.yml index 72dcf2b..3db6f6e 100644 --- a/roles/user/secrets/bw/tasks/main.yml +++ b/roles/user/secrets/bw/tasks/main.yml @@ -17,15 +17,21 @@ state: directory mode: 0700 owner: "{{ target_user }}" - group: "{{ target_user }}" + group: "{{ target_group }}" -- name: Create directories for different Bitwarden accounts +- name: Create directories for public Bitwarden instance ansible.builtin.file: - path: "~/.config/Bitwarden CLI/{{ item }}" + path: "~/.config/Bitwarden CLI/vault.bitwarden.com" state: directory mode: 0700 owner: "{{ target_user }}" - group: "{{ target_user }}" - loop: - - vault.bitwarden.com - - vault.mfocko.xyz + 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