Fix regression to backup task on first time setup.
This commit is contained in:
parent
47407aefab
commit
2bce9c77d5
@ -33,11 +33,16 @@
|
||||
when: git_repository.changed
|
||||
changed_when: git_repository.changed
|
||||
|
||||
- name: Check if strfry data path exists
|
||||
ansible.builtin.stat:
|
||||
path: "{{ strfry_data_path }}"
|
||||
register: strfry_data_path_stat
|
||||
|
||||
- name: Backup existing strfry-db
|
||||
ansible.builtin.shell:
|
||||
cmd: strfry export > backup.jsonl
|
||||
chdir: "{{ strfry_binary_path }}"
|
||||
chdir: "{{ strfry_data_path }}"
|
||||
become: yes
|
||||
become_user: "{{ strfry_system_user }}"
|
||||
when: git_repository.changed
|
||||
when: git_repository.changed and strfry_data_path_stat.stat.exists
|
||||
changed_when: git_repository.changed
|
Loading…
Reference in New Issue
Block a user