Lookup the variable for the password store.

This commit is contained in:
2022-02-24 09:05:33 +01:00
parent 44391218ec
commit d1412d13f1

View File

@@ -48,7 +48,7 @@
label: "{{ item.key }}" label: "{{ item.key }}"
- name: Backup mysql databases - name: Backup mysql databases
shell: docker exec {{ item }}-db mysqldump -u{{ item }} -p{{ item + '-password' }} {{ item }} > {{ backup_dir }}/{{ item }}/db-{{ ansible_date_time.iso8601_basic_short }}.sql shell: docker exec {{ item }}-db mysqldump -u{{ item }} -p{{ lookup('vars', item ~ '-password' }} {{ item }} > {{ backup_dir }}/{{ item }}/db-{{ ansible_date_time.iso8601_basic_short }}.sql
loop: "{{ mysql_databases }}" loop: "{{ mysql_databases }}"
- name: Backup postgres databases - name: Backup postgres databases