[test last]

This commit is contained in:
2025-11-11 17:13:28 +01:00
parent ac5304fa0e
commit 2a6b992c96

View File

@@ -61,20 +61,34 @@
mode: '0755'
remote_src: yes
delegate_to: localhost
- name: bitwarden token session
ansible.builtin.command:
cmd: "{{ item }}"
environment:
BW_CLIENTID: "{{ bw_client_id }}"
BW_CLIENTSECRET: "{{ bw_client_secret }}"
loop:
- bw config server {{ vaultwarden_url }}
- bw login --apikey
- bw unlock {{ bw_client_password }} --raw
delegate_to: localhost
register: bw_session_result
when: bw_check.rc != 0
- name: bitwarden token session
ansible.builtin.command:
cmd: "{{ item }}"
environment:
BW_CLIENTID: "{{ bw_client_id }}"
BW_CLIENTSECRET: "{{ bw_client_secret }}"
loop:
- bw config server {{ vaultwarden_url }}
- bw login --apikey
- bw unlock {{ bw_client_password }} --raw
register: bw_session_result
# - name: bitwarden token session
# ansible.builtin.command:
# cmd: "{{ item }}"
# environment:
# BW_CLIENTID: "{{ bw_client_id }}"
# BW_CLIENTSECRET: "{{ bw_client_secret }}"
# loop:
# - bw config server {{ vaultwarden_url }}
# - bw login --apikey
# - bw unlock {{ bw_client_password }} --raw
# delegate_to: localhost
# register: bw_session_result
- debug:
@@ -87,9 +101,9 @@
environment:
BW_SESSION: "{{ bw_session_result.results[-1].stdout }}"
- name: logout
ansible.builtin.command:
cmd: bw logout
# - name: logout
# ansible.builtin.command:
# cmd: bw logout
# - name: Return all secrets from a path
# delegate_to: localhost