Przeglądaj źródła

Replace matrix_playbook_runtime_results with devture_playbook_runtime_messages_list (via com.devture.ansible.role.playbook_runtime_messages)

pull/2201/head^2
Slavi Pantaleev 3 lat temu
rodzic
commit
db19482d0c
11 zmienionych plików z 24 dodań i 35 usunięć
  1. +2
    -2
      roles/custom/matrix-bridge-appservice-irc/tasks/migrate_nedb_to_postgres.yml
  2. +2
    -2
      roles/custom/matrix-bridge-appservice-slack/tasks/migrate_nedb_to_postgres.yml
  3. +2
    -2
      roles/custom/matrix-bridge-mautrix-facebook/tasks/validate_config.yml
  4. +0
    -7
      roles/custom/matrix-common-after/tasks/dump_runtime_results.yml
  5. +0
    -4
      roles/custom/matrix-common-after/tasks/main.yml
  6. +2
    -2
      roles/custom/matrix-postgres-backup/tasks/setup_postgres_backup.yml
  7. +2
    -2
      roles/custom/matrix-postgres/tasks/import_generic_sqlite_db.yml
  8. +2
    -2
      roles/custom/matrix-postgres/tasks/migrate_db_to_postgres.yml
  9. +6
    -6
      roles/custom/matrix-postgres/tasks/setup_postgres.yml
  10. +3
    -3
      roles/custom/matrix-registration/tasks/generate_token.yml
  11. +3
    -3
      roles/custom/matrix-registration/tasks/list_tokens.yml

+ 2
- 2
roles/custom/matrix-bridge-appservice-irc/tasks/migrate_nedb_to_postgres.yml Wyświetl plik

@@ -66,9 +66,9 @@

- name: Inject result
ansible.builtin.set_fact:
matrix_playbook_runtime_results: |
devture_playbook_runtime_messages_list: |
{{
matrix_playbook_runtime_results | default([])
devture_playbook_runtime_messages_list | default([])
+
[
"NOTE: Your appservice-irc database files have been imported into Postgres. The original database files have been moved from `{{ matrix_appservice_irc_data_path }}/*.db` to `{{ matrix_appservice_irc_data_path }}/*.db.backup`. When you've confirmed that the import went well and everything works, you should be able to safely delete these files."


+ 2
- 2
roles/custom/matrix-bridge-appservice-slack/tasks/migrate_nedb_to_postgres.yml Wyświetl plik

@@ -62,9 +62,9 @@

- name: Inject result
ansible.builtin.set_fact:
matrix_playbook_runtime_results: |
devture_playbook_runtime_messages_list: |
{{
matrix_playbook_runtime_results | default([])
devture_playbook_runtime_messages_list | default([])
+
[
"NOTE: Your appservice-slack database files have been imported into Postgres. The original database files have been moved from `{{ matrix_appservice_slack_data_path }}/*.db` to `{{ matrix_appservice_slack_data_path }}/*.db.backup`. When you've confirmed that the import went well and everything works, you should be able to safely delete these files."


+ 2
- 2
roles/custom/matrix-bridge-mautrix-facebook/tasks/validate_config.yml Wyświetl plik

@@ -14,9 +14,9 @@
block:
- name: Inject warning if on an old SQLite-supporting version
ansible.builtin.set_fact:
matrix_playbook_runtime_results: |
devture_playbook_runtime_messages_list: |
{{
matrix_playbook_runtime_results | default([])
devture_playbook_runtime_messages_list | default([])
+
[
"NOTE: Your mautrix-facebook bridge is still on SQLite and on the last version that supported it, before support was dropped. Support has been subsequently re-added in v0.3.2, so we advise you to upgrade (by removing your `matrix_mautrix_facebook_docker_image` definition from vars.yml)"


+ 0
- 7
roles/custom/matrix-common-after/tasks/dump_runtime_results.yml Wyświetl plik

@@ -1,7 +0,0 @@
---
# Ansible outputs the message in the `item=` field.
# It's unnecessary to output it again in the actual message, so we don't.
- ansible.builtin.debug:
msg: ""
with_items: "{{ matrix_playbook_runtime_results }}"
when: "matrix_playbook_runtime_results is defined and matrix_playbook_runtime_results | length > 0"

+ 0
- 4
roles/custom/matrix-common-after/tasks/main.yml Wyświetl plik

@@ -10,10 +10,6 @@
tags:
- stop

- ansible.builtin.import_tasks: "{{ role_path }}/tasks/dump_runtime_results.yml"
tags:
- always

- ansible.builtin.import_tasks: "{{ role_path }}/tasks/run_docker_prune.yml"
tags:
- run-docker-prune

+ 2
- 2
roles/custom/matrix-postgres-backup/tasks/setup_postgres_backup.yml Wyświetl plik

@@ -101,9 +101,9 @@
# We just want to notify the user. Deleting data is too destructive.
- name: Inject warning if matrix-postgres backup data remains
ansible.builtin.set_fact:
matrix_playbook_runtime_results: |
devture_playbook_runtime_messages_list: |
{{
matrix_playbook_runtime_results | default([])
devture_playbook_runtime_messages_list | default([])
+
[
"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."


+ 2
- 2
roles/custom/matrix-postgres/tasks/import_generic_sqlite_db.yml Wyświetl plik

@@ -92,9 +92,9 @@

- name: Inject result
ansible.builtin.set_fact:
matrix_playbook_runtime_results: |
devture_playbook_runtime_messages_list: |
{{
matrix_playbook_runtime_results | default([])
devture_playbook_runtime_messages_list | default([])
+
[
"NOTE: Your SQLite database file has been imported into Postgres. The original file has been moved from `{{ sqlite_database_path }}` to `{{ sqlite_database_path }}.backup`. When you've confirmed that the import went well and everything works, you should be able to safely delete this file."


+ 2
- 2
roles/custom/matrix-postgres/tasks/migrate_db_to_postgres.yml Wyświetl plik

@@ -166,9 +166,9 @@

- name: Inject result
ansible.builtin.set_fact:
matrix_playbook_runtime_results: |
devture_playbook_runtime_messages_list: |
{{
matrix_playbook_runtime_results | default([])
devture_playbook_runtime_messages_list | default([])
+
[
"NOTE: Your {{ matrix_postgres_db_migration_request.engine_old }} database file has been imported into Postgres. The original database file has been moved from `{{ matrix_postgres_db_migration_request.src }}` to `{{ matrix_postgres_db_migration_request.src }}.backup`. When you've confirmed that the import went well and everything works, you should be able to safely delete this file."


+ 6
- 6
roles/custom/matrix-postgres/tasks/setup_postgres.yml Wyświetl plik

@@ -25,9 +25,9 @@

- name: Inject warning if on an old version of Postgres
ansible.builtin.set_fact:
matrix_playbook_runtime_results: |
devture_playbook_runtime_messages_list: |
{{
matrix_playbook_runtime_results | default([])
devture_playbook_runtime_messages_list | default([])
+
[
"NOTE: Your setup is on an old Postgres version ({{ matrix_postgres_docker_image_to_use }}), while {{ matrix_postgres_docker_image_latest }} is supported. You can upgrade using --tags=upgrade-postgres"
@@ -146,9 +146,9 @@

- name: Inject warning if backup data remains
ansible.builtin.set_fact:
matrix_playbook_runtime_results: |
devture_playbook_runtime_messages_list: |
{{
matrix_playbook_runtime_results | default([])
devture_playbook_runtime_messages_list | default([])
+
[
"NOTE: You have some Postgres backup data in `{{ matrix_postgres_data_path }}-auto-upgrade-backup`, which was created during the last major Postgres update you ran. If your setup works well after this upgrade, feel free to delete this whole directory."
@@ -194,9 +194,9 @@
# We just want to notify the user. Deleting data is too destructive.
- name: Inject warning if matrix-postgres local data remains
ansible.builtin.set_fact:
matrix_playbook_runtime_results: |
devture_playbook_runtime_messages_list: |
{{
matrix_playbook_runtime_results | default([])
devture_playbook_runtime_messages_list | default([])
+
[
"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 it."


+ 3
- 3
roles/custom/matrix-registration/tasks/generate_token.yml Wyświetl plik

@@ -41,11 +41,11 @@
{{ matrix_registration_api_result.json }}
check_mode: false

- name: Inject result message into matrix_playbook_runtime_results
- name: Inject result message into devture_playbook_runtime_messages_list
ansible.builtin.set_fact:
matrix_playbook_runtime_results: |
devture_playbook_runtime_messages_list: |
{{
matrix_playbook_runtime_results | default([])
devture_playbook_runtime_messages_list | default([])
+
[matrix_registration_api_result_message]
}}


+ 3
- 3
roles/custom/matrix-registration/tasks/list_tokens.yml Wyświetl plik

@@ -20,11 +20,11 @@
{{ matrix_registration_api_result.json | to_nice_json }}
check_mode: false

- name: Inject result message into matrix_playbook_runtime_results
- name: Inject result message into devture_playbook_runtime_messages_list
ansible.builtin.set_fact:
matrix_playbook_runtime_results: |
devture_playbook_runtime_messages_list: |
{{
matrix_playbook_runtime_results | default([])
devture_playbook_runtime_messages_list | default([])
+
[matrix_registration_api_result_message]
}}


Ładowanie…
Anuluj
Zapisz