[test last]
This commit is contained in:
15
backup.yml
15
backup.yml
@@ -54,7 +54,7 @@
|
||||
|
||||
- name: bitwarden token session
|
||||
ansible.builtin.command:
|
||||
cmd: "{{ item }}"
|
||||
shell: "{{ item }}"
|
||||
environment:
|
||||
BW_CLIENTID: "{{ bw_client_id }}"
|
||||
BW_CLIENTSECRET: "{{ bw_client_secret }}"
|
||||
@@ -66,15 +66,22 @@
|
||||
delegate_to: localhost
|
||||
register: bw_session_result
|
||||
|
||||
|
||||
# - name: Return all secrets from a path
|
||||
# ansible.builtin.debug: "{{ bw_session_result.results[-1].stdout }}"
|
||||
- name: Return all secrets from a path
|
||||
ansible.builtin.debug: "{{ bw_session_result }}"
|
||||
|
||||
- name: Set BW_SESSION as environment variable globally
|
||||
ansible.builtin.set_fact:
|
||||
bw_session: "{{ bw_session_result.results[-1].stdout | trim }}"
|
||||
no_log: true
|
||||
|
||||
- name: bitwarden token session
|
||||
ansible.builtin.command:
|
||||
shell: bw unlock --passwordenv BW_PASSWORD --raw
|
||||
environment:
|
||||
BW_CLIENTID: "{{ bw_client_id }}"
|
||||
BW_CLIENTSECRET: "{{ bw_client_secret }}"
|
||||
BW_PASSWORD: "{{ bw_client_password }}"
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Utiliser le lookup
|
||||
ansible.builtin.debug:
|
||||
|
||||
Reference in New Issue
Block a user