when:"matrix_postgres_use_external and matrix_postgres_service_stat.stat.exists"
- name:Check existance of matrix-postgres local data path
stat:path="{{ matrix_postgres_data_path }}"
register:matrix_postgres_data_path_stat
when:matrix_postgres_use_external
# We just want to notify the user. Deleting data is too destructive.
- name:Notify if matrix-postgres local data remains
debug:
msg:"Note: You are not using a local PostgreSQL database, but some old data remains from before in {{ matrix_postgres_data_path }}. Feel free to delete that."
when:"matrix_postgres_use_external and matrix_postgres_data_path_stat.stat.exists"