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 become: true
apt: apt:
name: name:
- curl - nodejs
- unzip - npm
- jq
state: present state: present
update_cache: true update_cache: true
- name: Instalar Bitwarden CLI - name: Instalar Bitwarden CLI via npm
become: true become: true
shell: | shell: npm install -g @bitwarden/cli
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
args: 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 - name: Fazer login no Bitwarden
shell: bw login {{ bw_email }} --password {{ bw_password }} shell: bw login {{ bw_email }} --password {{ bw_password }}