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