bw via npm

This commit is contained in:
tomas.limpinho
2025-10-30 13:40:17 +00:00
parent 2b060b27f0
commit c0a8b0b00a

View File

@ -1,22 +1,22 @@
- name: Instalar dependências (curl, unzip, jq)
- name: Instalar Node.js e npm
become: true
apt:
name:
- curl
- unzip
- jq
- nodejs
- npm
state: present
update_cache: true
- name: Instalar Bitwarden CLI
- name: Instalar Bitwarden CLI via npm
become: true
shell: |
curl -L https://github.com/bitwarden/cli/releases/latest/download/bw-linux.zip -o bw.zip
unzip bw.zip
chmod +x bw
mv bw /usr/local/bin/bw
shell: npm install -g @bitwarden/cli
args:
creates: /usr/local/bin/bw
executable: /bin/bash
- name: Verificar instalação do Bitwarden CLI
command: bw --version
register: bw_version
failed_when: bw_version.rc != 0
- name: Fazer login no Bitwarden
shell: bw login {{ bw_email }} --password {{ bw_password }}