diff --git a/roles/custom/matrix-bridge-hookshot/defaults/main.yml b/roles/custom/matrix-bridge-hookshot/defaults/main.yml index d36dfd7a9..56b858874 100644 --- a/roles/custom/matrix-bridge-hookshot/defaults/main.yml +++ b/roles/custom/matrix-bridge-hookshot/defaults/main.yml @@ -2,6 +2,9 @@ # A bridge between Matrix and multiple project management services, such as GitHub, GitLab and JIRA. # Project source code URL: https://github.com/matrix-org/matrix-hookshot +# +run_reset_encryption: true +run_setup: true matrix_hookshot_enabled: true diff --git a/roles/custom/matrix-bridge-hookshot/tasks/main.yml b/roles/custom/matrix-bridge-hookshot/tasks/main.yml index 89f110dd4..538f95ba2 100644 --- a/roles/custom/matrix-bridge-hookshot/tasks/main.yml +++ b/roles/custom/matrix-bridge-hookshot/tasks/main.yml @@ -3,7 +3,7 @@ - tags: - reset-hookshot-encryption block: - - when: matrix_hookshot_enabled | bool + - when: matrix_hookshot_enabled | bool and run_reset_encryption | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/reset_encryption.yml" - tags: @@ -14,10 +14,10 @@ - install-hookshot - install-bridge-hookshot block: - - when: matrix_hookshot_enabled | bool + - when: matrix_hookshot_enabled | bool and run_setup | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml" - - when: matrix_hookshot_enabled | bool + - when: matrix_hookshot_enabled | bool and run_setup | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml" - tags: @@ -25,5 +25,5 @@ - setup-hookshot - setup-bridge-hookshot block: - - when: not matrix_hookshot_enabled | bool + - when: not matrix_hookshot_enabled | bool and run_setup | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml" diff --git a/roles/custom/matrix-client-element/defaults/main.yml b/roles/custom/matrix-client-element/defaults/main.yml index 20bd98737..77cadf014 100644 --- a/roles/custom/matrix-client-element/defaults/main.yml +++ b/roles/custom/matrix-client-element/defaults/main.yml @@ -3,6 +3,9 @@ matrix_client_element_enabled: true +run_setup: true +run_self_check: true + matrix_client_element_container_image_self_build: false matrix_client_element_container_image_self_build_repo: "https://github.com/element-hq/element-web.git" # Controls whether to patch webpack.config.js when self-building, so that building can pass on low-memory systems (< 4 GB RAM): diff --git a/roles/custom/matrix-client-element/tasks/main.yml b/roles/custom/matrix-client-element/tasks/main.yml index 770200678..a0d688070 100644 --- a/roles/custom/matrix-client-element/tasks/main.yml +++ b/roles/custom/matrix-client-element/tasks/main.yml @@ -12,18 +12,18 @@ - when: matrix_client_element_enabled | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare_themes.yml" - - when: matrix_client_element_enabled | bool + - when: matrix_client_element_enabled | bool and run_setup | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml" - tags: - setup-all - setup-client-element block: - - when: not matrix_client_element_enabled | bool + - when: not matrix_client_element_enabled | bool and run_setup | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml" - tags: - self-check block: - - when: matrix_client_element_enabled | bool + - when: matrix_client_element_enabled | bool and run_self_check | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/self_check.yml" diff --git a/roles/custom/matrix-static-files/defaults/main.yml b/roles/custom/matrix-static-files/defaults/main.yml index 51a996dc0..132a37370 100644 --- a/roles/custom/matrix-static-files/defaults/main.yml +++ b/roles/custom/matrix-static-files/defaults/main.yml @@ -3,6 +3,7 @@ # matrix-static-files is a role which generates and serves `/.well-known/matrix` files for the purposes of Matrix Delegation. # It also exposes some variables which allow this role to be used for serving additional files. +run_self_check: true matrix_static_files_enabled: true matrix_static_files_identifier: matrix-static-files diff --git a/roles/custom/matrix-static-files/tasks/main.yml b/roles/custom/matrix-static-files/tasks/main.yml index 7b5f25377..37e3428d5 100644 --- a/roles/custom/matrix-static-files/tasks/main.yml +++ b/roles/custom/matrix-static-files/tasks/main.yml @@ -23,4 +23,5 @@ - self-check - self-check-matrix-static-files block: - - ansible.builtin.include_tasks: "{{ role_path }}/tasks/self_check_well_known.yml" + - when: run_self_check | bool + ansible.builtin.include_tasks: "{{ role_path }}/tasks/self_check_well_known.yml" diff --git a/roles/custom/matrix-synapse/defaults/main.yml b/roles/custom/matrix-synapse/defaults/main.yml index 64872e0fd..a1090c219 100644 --- a/roles/custom/matrix-synapse/defaults/main.yml +++ b/roles/custom/matrix-synapse/defaults/main.yml @@ -21,6 +21,16 @@ matrix_synapse_version: v1.117.0 matrix_synapse_username: '' matrix_synapse_uid: '' matrix_synapse_gid: '' +# Variables to control which part of the role is run +# By default they are all true and filtering is done with tags +# these variables are for use from other playbooks etc +run_setup: true +run_self_check: true +run_synapse_register_user: true +run_synapse_update_user_password: true +run_synapse_import_media_store: true +run_synapse_rust_synapse_compress_state: true +run_synapse_import_sqlite_db: true matrix_synapse_container_image_self_build: false matrix_synapse_container_image_self_build_repo: "https://github.com/{{ matrix_synapse_github_org_and_repo }}.git" diff --git a/roles/custom/matrix-synapse/tasks/main.yml b/roles/custom/matrix-synapse/tasks/main.yml index 2a8a00942..1e4c41f14 100644 --- a/roles/custom/matrix-synapse/tasks/main.yml +++ b/roles/custom/matrix-synapse/tasks/main.yml @@ -29,7 +29,7 @@ - when: matrix_synapse_enabled | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml" - - when: matrix_synapse_enabled | bool + - when: matrix_synapse_enabled | bool and run_setup | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml" - tags: @@ -37,43 +37,44 @@ - setup-synapse block: # This always runs because it handles uninstallation for sub-components too. - - ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml" + - when: not matrix_synapse_enabled | bool and run_setup | bool + ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml" - tags: - import-synapse-media-store block: - - when: matrix_synapse_enabled | bool + - when: matrix_synapse_enabled | bool and run_synapse_import_media_store | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/import_media_store.yml" - tags: - import-synapse-sqlite-db block: - - when: matrix_synapse_enabled | bool + - when: matrix_synapse_enabled | bool and run_synapse_import_sqlite_db ansible.builtin.include_tasks: "{{ role_path }}/tasks/import_synapse_sqlite_db.yml" - tags: - register-user block: - - when: matrix_synapse_enabled | bool + - when: matrix_synapse_enabled | bool and run_synapse_register_user | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/register_user.yml" - tags: - update-user-password block: - - when: matrix_synapse_enabled | bool + - when: matrix_synapse_enabled | bool and run_synapse_update_user_password | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/update_user_password.yml" - tags: - rust-synapse-compress-state block: - - when: matrix_synapse_enabled | bool + - when: matrix_synapse_enabled | bool and run_synapse_rust_synapse_compress_state | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/rust-synapse-compress-state/main.yml" - tags: - self-check block: - - when: matrix_synapse_enabled | bool + - when: matrix_synapse_enabled | bool and run_self_check | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/self_check_client_api.yml" - - when: matrix_synapse_enabled | bool + - when: matrix_synapse_enabled | bool and run_self_check | bool ansible.builtin.include_tasks: "{{ role_path }}/tasks/self_check_federation_api.yml"