From 331b8431e3b97d536615534e2420e7206d380c01 Mon Sep 17 00:00:00 2001 From: Dryusdan Date: Thu, 15 Sep 2022 11:27:33 +0200 Subject: [PATCH 1/5] Change build directory --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 5a61463..6dec2b9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -218,7 +218,7 @@ - name: Build web-vault shell: "npm run dist:oss:selfhost" args: - chdir: "{{ item.home }}/web-vault" + chdir: "{{ item.home }}/web-vault/apps/web" become: yes become_user : "{{ item.name }}" become_method: su From d5ceb8e243835fff4f03d2e709245afaa8948f73 Mon Sep 17 00:00:00 2001 From: Dryusdan Date: Thu, 15 Sep 2022 11:43:59 +0200 Subject: [PATCH 2/5] Remove deps, build and web-vault folder --- tasks/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 6dec2b9..c386615 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -264,6 +264,28 @@ - install - upgrade +- name: Delete deps directory + ansible.builtin.copy: + path: "{{ item.app_folder}}/build" + state: absent + loop: "{{ bitwarden }}" + tags: + +- name: Delete deps directory + ansible.builtin.copy: + path: "{{ item.app_folder}}/deps" + state: absent + loop: "{{ bitwarden }}" + tags: + - upgrade + +- name: Delete web-vault directory + ansible.builtin.copy: + path: "{{ item.app_folder}}/web-vault" + state: absent + loop: "{{ bitwarden }}" + tags: + - name: Install bitwarden shell: "rsync -a --info=progress2 {{ item.home }}/bitwarden_rs/target/release/ {{ item.app_folder }}" become: yes From c529474de64f8973c3af85e637c900438163421c Mon Sep 17 00:00:00 2001 From: Dryusdan Date: Thu, 15 Sep 2022 11:45:28 +0200 Subject: [PATCH 3/5] Fix typo --- tasks/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index c386615..b83b1be 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -264,12 +264,13 @@ - install - upgrade -- name: Delete deps directory +- name: Delete build directory ansible.builtin.copy: path: "{{ item.app_folder}}/build" state: absent loop: "{{ bitwarden }}" tags: + - upgrade - name: Delete deps directory ansible.builtin.copy: @@ -285,6 +286,7 @@ state: absent loop: "{{ bitwarden }}" tags: + - upgrade - name: Install bitwarden shell: "rsync -a --info=progress2 {{ item.home }}/bitwarden_rs/target/release/ {{ item.app_folder }}" From d79b4bd6409fd74308a0deed83b6763a4a19a37e Mon Sep 17 00:00:00 2001 From: Dryusdan Date: Thu, 15 Sep 2022 13:11:33 +0200 Subject: [PATCH 4/5] Fix build path --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index b83b1be..80e1fb6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -229,7 +229,7 @@ - upgrade - name: Copy web-vault - shell: "cp -a {{ item.home }}/web-vault/build/ {{ item.home }}/bitwarden_rs/target/release/web-vault/" + shell: "cp -a {{ item.home }}/web-vault/apps/web/build/ {{ item.home }}/bitwarden_rs/target/release/web-vault/" become: yes become_user : "{{ item.name }}" become_method: su From 689fabda7fbb2ecbedc125b90669b7b190efe039 Mon Sep 17 00:00:00 2001 From: Dryusdan Date: Thu, 15 Sep 2022 13:25:42 +0200 Subject: [PATCH 5/5] Fix typo, 'copy' by 'file' --- tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 80e1fb6..29d10c6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -265,7 +265,7 @@ - upgrade - name: Delete build directory - ansible.builtin.copy: + ansible.builtin.file: path: "{{ item.app_folder}}/build" state: absent loop: "{{ bitwarden }}" @@ -273,7 +273,7 @@ - upgrade - name: Delete deps directory - ansible.builtin.copy: + ansible.builtin.file: path: "{{ item.app_folder}}/deps" state: absent loop: "{{ bitwarden }}" @@ -281,7 +281,7 @@ - upgrade - name: Delete web-vault directory - ansible.builtin.copy: + ansible.builtin.file: path: "{{ item.app_folder}}/web-vault" state: absent loop: "{{ bitwarden }}"