Browse Source

Get version on github before pulling

stable
Dryusdan 1 year ago
parent
commit
87a5619e51
  1. 28
      tasks/main.yml

28
tasks/main.yml

@ -8,6 +8,18 @@
tags:
- install
- name: Get bitwarden_rs version
uri:
url: https://api.github.com/repos/dani-garcia/bitwarden_rs/releases/latest
method: GET
return_content: yes
status_code: 200
body_format: json
register: bitwarden_rs_github_repo
tags:
- install
- upgrade
- name: Get rustup installer
get_url:
url: https://sh.rustup.rs
@ -71,6 +83,7 @@
git:
repo: https://github.com/dani-garcia/bitwarden_rs.git
dest: "{{ item.home }}/bitwarden_rs"
version: "{{ bitwarden_rs_github_repo.json.tag_name }}"
become: yes
become_user : "{{ item.name }}"
become_method: su
@ -206,6 +219,21 @@
- install
- upgrade
- name: Create bitwarden data folder
ansible.builtin.file:
path: "{{ item.app_folder }}/data"
state: directory
owner: "{{ item.name }}"
group: "{{ item.name }}"
mode: '0750'
loop: "{{ bitwarden }}"
tags:
- install
- upgrade
- name: Install bitwarden
shell: "rsync -a --info=progress2 {{ item.home }}/bitwarden_rs/target/release/ {{ item.app_folder }}"
- name: Install bitwarden
shell: "rsync -a --info=progress2 {{ item.home }}/bitwarden_rs/target/release/ {{ item.app_folder }}"
become: yes

Loading…
Cancel
Save