[test]
This commit is contained in:
19
backup.yml
19
backup.yml
@@ -5,6 +5,8 @@
|
|||||||
vars:
|
vars:
|
||||||
# Variables depuis Environment (non-sensibles)
|
# Variables depuis Environment (non-sensibles)
|
||||||
app_env: "{{ lookup('env', 'bw_client_id') }}"
|
app_env: "{{ lookup('env', 'bw_client_id') }}"
|
||||||
|
bw_client_secret: "{{ lookup('env', 'bw_client_secret') }}"
|
||||||
|
bw_client_id: "{{ lookup('env', 'bw_client_id') }}"
|
||||||
dockerapps_path: /opt/dockerapps
|
dockerapps_path: /opt/dockerapps
|
||||||
gitea_conf: /appdata/gitea/gitea/
|
gitea_conf: /appdata/gitea/gitea/
|
||||||
gitea_db: /appdata/gitea/gitea-db/gitea-db-pg.sql
|
gitea_db: /appdata/gitea/gitea-db/gitea-db-pg.sql
|
||||||
@@ -26,9 +28,24 @@
|
|||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
msg: "{{ bw_client_id }}"
|
msg: "{{ bw_client_id }}"
|
||||||
delegate_to: localhost
|
# delegate_to: localhost
|
||||||
#! fin test
|
#! fin test
|
||||||
|
|
||||||
|
|
||||||
|
- name: Obtenir le session token
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: bw login "{{ vaultwarden_url }}" --apikey
|
||||||
|
environment:
|
||||||
|
BW_CLIENTID: "{{ bw_client_id }}"
|
||||||
|
BW_CLIENTSECRET: "{{ bw_client_secret }}"
|
||||||
|
register: bw_session_result
|
||||||
|
#
|
||||||
|
- name: Utiliser le lookup
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ lookup('community.general.bitwarden', 'Token full access gitea', field='password') }}"
|
||||||
|
environment:
|
||||||
|
BW_SESSION: "{{ bw_session_result.stdout }}"
|
||||||
|
|
||||||
# - name: Return all secrets from a path
|
# - name: Return all secrets from a path
|
||||||
# delegate_to: localhost
|
# delegate_to: localhost
|
||||||
# ansible.builtin.debug:
|
# ansible.builtin.debug:
|
||||||
|
|||||||
Reference in New Issue
Block a user