Przeglądaj źródła

synapse role workers setup: make configs clean action remote compatible

Many people probably didn't even know this - that ansible can be
quite a bit picky about what it will be willing to work with remotely.

Thanks @maxklenk !
pull/456/head
Marcel Partap 5 lat temu
rodzic
commit
414b812a29
2 zmienionych plików z 18 dodań i 6 usunięć
  1. +9
    -3
      roles/matrix-synapse/tasks/workers/setup_install.yml
  2. +9
    -3
      roles/matrix-synapse/tasks/workers/setup_uninstall.yml

+ 9
- 3
roles/matrix-synapse/tasks/workers/setup_install.yml Wyświetl plik

@@ -46,12 +46,18 @@
enabled: true enabled: true
with_items: "{{ matrix_synapse_workers_enabled_list }}" with_items: "{{ matrix_synapse_workers_enabled_list }}"


- name: Find worker configs to be cleaned
find:
path: "{{ matrix_synapse_config_dir_path }}"
patterns: "worker.*.yaml"
use_regex: true
register: worker_config_files

- name: Ensure previous worker configs are cleaned - name: Ensure previous worker configs are cleaned
file: file:
path: "{{ item }}"
path: "{{ item.path }}"
state: absent state: absent
with_fileglob:
- "{{ matrix_synapse_config_dir_path }}/worker.*.yaml"
with_items: "{{ worker_config_files.files }}"


- name: Ensure creation of specific worker configs - name: Ensure creation of specific worker configs
template: template:


+ 9
- 3
roles/matrix-synapse/tasks/workers/setup_uninstall.yml Wyświetl plik

@@ -25,12 +25,18 @@
state: absent state: absent
register: matrix_synapse_worker_systemd_service_result register: matrix_synapse_worker_systemd_service_result


- name: Find worker configs to be cleaned
find:
path: "{{ matrix_synapse_config_dir_path }}"
patterns: "worker.*.yaml"
use_regex: true
register: worker_config_files

- name: Ensure worker configs are cleaned - name: Ensure worker configs are cleaned
file: file:
path: "{{ item }}"
path: "{{ item.path }}"
state: absent state: absent
with_fileglob:
- "{{ matrix_synapse_config_dir_path }}/worker.*.yaml"
with_items: "{{ worker_config_files.files }}"


- name: Remove workers from synapse.wants list - name: Remove workers from synapse.wants list
set_fact: set_fact:


Ładowanie…
Anuluj
Zapisz