diff --git a/roles/matrix-client-element/tasks/init.yml b/roles/matrix-client-element/tasks/init.yml index 44fa1544..9bddd8da 100644 --- a/roles/matrix-client-element/tasks/init.yml +++ b/roles/matrix-client-element/tasks/init.yml @@ -1,10 +1,3 @@ - set_fact: matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-client-element.service'] }}" when: matrix_client_element_enabled|bool - -# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070 -# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407 -- name: Fail if trying to self-build on Ansible < 2.8 - fail: - msg: "To self-build the Element image, you should use Ansible 2.8 or higher. See docs/ansible.md" - when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_client_element_container_image_self_build and matrix_client_element_enabled" diff --git a/roles/matrix-client-element/tasks/main.yml b/roles/matrix-client-element/tasks/main.yml index cdc5fa97..213c158f 100644 --- a/roles/matrix-client-element/tasks/main.yml +++ b/roles/matrix-client-element/tasks/main.yml @@ -14,12 +14,6 @@ - setup-all - setup-client-element -- import_tasks: "{{ role_path }}/tasks/migrate_riot_web.yml" - when: run_setup|bool - tags: - - setup-all - - setup-client-element - - import_tasks: "{{ role_path }}/tasks/setup.yml" when: run_setup|bool tags: diff --git a/roles/matrix-client-element/tasks/migrate_riot_web.yml b/roles/matrix-client-element/tasks/migrate_riot_web.yml deleted file mode 100644 index dd0eb0f8..00000000 --- a/roles/matrix-client-element/tasks/migrate_riot_web.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- - -- name: Check existence of matrix-riot-web.service - stat: - path: "{{ matrix_systemd_path }}/matrix-riot-web.service" - register: matrix_client_riot_web_service_stat - when: "matrix_client_element_enabled|bool" - -- name: Ensure matrix-riot-web is stopped - service: - name: matrix-riot-web - state: stopped - daemon_reload: yes - register: stopping_result - when: "matrix_client_element_enabled|bool and matrix_client_riot_web_service_stat.stat.exists" - -- name: Ensure matrix-riot-web.service doesn't exist - file: - path: "{{ matrix_systemd_path }}/matrix-riot-web.service" - state: absent - when: "matrix_client_element_enabled|bool and matrix_client_riot_web_service_stat.stat.exists" - -- name: Ensure systemd reloaded after matrix-riot-web.service removal - service: - daemon_reload: yes - when: "matrix_client_element_enabled|bool and matrix_client_riot_web_service_stat.stat.exists" - -- name: Check existence of /matrix/riot-web - stat: - path: "/matrix/riot-web" - register: matrix_client_riot_web_dir_stat - when: "matrix_client_element_enabled|bool" - -- name: Relocate /matrix/riot-web to /matrix/client-element - command: "mv /matrix/riot-web /matrix/client-element" - when: "matrix_client_element_enabled|bool and matrix_client_riot_web_dir_stat.stat.exists" diff --git a/roles/matrix-client-element/tasks/validate_config.yml b/roles/matrix-client-element/tasks/validate_config.yml index d246b612..06c607b9 100644 --- a/roles/matrix-client-element/tasks/validate_config.yml +++ b/roles/matrix-client-element/tasks/validate_config.yml @@ -7,14 +7,3 @@ when: "vars[item] == ''" with_items: - "matrix_client_element_default_hs_url" - -- name: (Deprecation) Catch and report riot-web variables - fail: - msg: >- - Riot has been renamed to Element (https://element.io/blog/welcome-to-element/). - The playbook will migrate your existing configuration and data automatically, but you need to adjust variable names. - Please change your configuration (vars.yml) to rename all riot-web variables (`{{ item.old }}` -> `{{ item.new }}`). - Also note that DNS configuration changes may be necessary. - when: "vars | dict2items | selectattr('key', 'match', item.old) | list | items2dict" - with_items: - - {'old': 'matrix_riot_web_.*', 'new': 'matrix_client_element_.*'}