Skip to content

Commit

Permalink
Add BW CLI install playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
Encephala committed Jan 12, 2024
1 parent c27f15e commit fac13f6
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions playbooks/install_bw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
- name: Install BitWarden CLI
hosts: localhost
become: true

pre_tasks:
- name: Ensure Debian or Ubuntu
ansible.builtin.fail:
msg: "This playbook only works on Debian or Ubuntu"
when: ansible_distribution != "Debian" and ansible_distribution != "Ubuntu"

- name: APT Update
ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600


tasks:
- name: Download BW
ansible.builtin.get_url:
url: https://vault.bitwarden.com/download/?app=cli&platform=linux
dest: /tmp/bw.zip

- name: Unzip
ansible.builtin.unarchive:
src: /tmp/bw.zip
dest: /usr/local/bin/
mode: "0755"

0 comments on commit fac13f6

Please sign in to comment.