Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

40 строки
1.4 KiB

  1. ---
  2. - name: Check existence of matrix-postgres-backup service
  3. ansible.builtin.stat:
  4. path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postgres-backup.service"
  5. register: matrix_postgres_backup_service_stat
  6. - when: matrix_postgres_backup_service_stat.stat.exists | bool
  7. block:
  8. - name: Ensure matrix-postgres-backup is stopped
  9. ansible.builtin.service:
  10. name: matrix-postgres-backup
  11. state: stopped
  12. enabled: false
  13. daemon_reload: true
  14. - name: Ensure matrix-postgres-backup.service doesn't exist
  15. ansible.builtin.file:
  16. path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-postgres-backup.service"
  17. state: absent
  18. - name: Check existence of matrix-postgres-backup backup path
  19. ansible.builtin.stat:
  20. path: "{{ matrix_postgres_backup_path }}"
  21. register: matrix_postgres_backup_path_stat
  22. # We just want to notify the user. Deleting data is too destructive.
  23. - name: Inject warning if matrix-postgres backup data remains
  24. ansible.builtin.set_fact:
  25. devture_playbook_runtime_messages_list: |
  26. {{
  27. devture_playbook_runtime_messages_list | default([])
  28. +
  29. [
  30. "NOTE: You are not using the local backup service to backup the PostgreSQL database, but some old data remains from before in `{{ matrix_postgres_backup_path }}`. Feel free to delete it."
  31. ]
  32. }}
  33. when: matrix_postgres_backup_path_stat.stat.exists | bool