mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private.git
synced 2025-12-16 19:27:37 +00:00
bw on stolon
This commit is contained in:
@ -21,9 +21,10 @@
|
||||
shell: ls -l /tmp/stolon/kubernetes-files/files
|
||||
register: resultado_ls
|
||||
|
||||
|
||||
- name: Obter várias notas do Bitwarden
|
||||
shell: |
|
||||
export BW_SESSION={{ lookup('env', 'BW_SESSION') }}
|
||||
export BW_SESSION=(bw unlock {{ bw_password }} --raw)
|
||||
bw get item "{{ item.id }}" --session $BW_SESSION | jq -r '.notes' > {{ item.dest }}
|
||||
loop:
|
||||
- { id: "iac.ansible.dockersecrets", dest: "/tmp/stolon/kubernetes-files/files/docker-secrets.yaml" }
|
||||
@ -31,6 +32,8 @@
|
||||
- { id: "iac.ansible.stolon.keeper.secret", dest: "/tmp/stolon/kubernetes-files/files/stolon-secret.yaml" }
|
||||
args:
|
||||
executable: /bin/bash
|
||||
environment:
|
||||
BW_PASSWORD: "{{ BW_PASSWORD }}"
|
||||
|
||||
|
||||
- name: Mostrar resultado do ls
|
||||
|
||||
@ -72,12 +72,6 @@
|
||||
environment:
|
||||
BW_PASSWORD: "{{ BW_PASSWORD }}"
|
||||
|
||||
- name: 2 Desbloquear cofre e guardar sessão
|
||||
shell: bw unlock {{ bw_password }} --raw
|
||||
register: bw_session
|
||||
environment:
|
||||
BW_PASSWORD: "{{ BW_PASSWORD }}"
|
||||
|
||||
- name: Exportar sessão para ambiente local
|
||||
shell: echo "export BW_SESSION={{ bw_session.stdout }}" >> /etc/profile.d/bw-session.sh
|
||||
become: true
|
||||
Reference in New Issue
Block a user