diff --git a/roles/matrix-conduit/tasks/conduit/setup.yml b/roles/matrix-conduit/tasks/conduit/setup.yml index 57aaafdf..055fbd27 100644 --- a/roles/matrix-conduit/tasks/conduit/setup.yml +++ b/roles/matrix-conduit/tasks/conduit/setup.yml @@ -1,5 +1,23 @@ --- +- name: Ensure Conduit config path exists + file: + path: "{{ matrix_conduit_config_path }}" + state: directory + mode: 0750 + owner: "{{ matrix_user_username }}" + group: "{{ matrix_user_groupname }}" + when: "matrix_conduit_enabled|bool" + +- name: Ensure Conduit data path exists + file: + path: "{{ matrix_conduit_data_path }}" + state: directory + mode: 0770 + owner: "{{ matrix_user_username }}" + group: "{{ matrix_user_groupname }}" + when: "matrix_conduit_enabled|bool" + - import_tasks: "{{ role_path }}/tasks/conduit/setup_install.yml" when: matrix_conduit_enabled|bool diff --git a/roles/matrix-conduit/tasks/main.yml b/roles/matrix-conduit/tasks/main.yml index 8ace5f48..20d91ac8 100644 --- a/roles/matrix-conduit/tasks/main.yml +++ b/roles/matrix-conduit/tasks/main.yml @@ -4,7 +4,7 @@ tags: - always -- import_tasks: "{{ role_path }}/tasks/setup_conduit.yml" +- import_tasks: "{{ role_path }}/tasks/conduit/setup.yml" when: run_setup|bool tags: - setup-all diff --git a/roles/matrix-conduit/tasks/setup_conduit.yml b/roles/matrix-conduit/tasks/setup_conduit.yml deleted file mode 100644 index 25632c80..00000000 --- a/roles/matrix-conduit/tasks/setup_conduit.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- name: Ensure Conduit config path exists - file: - path: "{{ matrix_conduit_config_path }}" - state: directory - mode: 0750 - owner: "{{ matrix_user_username }}" - group: "{{ matrix_user_groupname }}" - when: "matrix_conduit_enabled|bool" - -- name: Ensure Conduit data path exists - file: - path: "{{ matrix_conduit_data_path }}" - state: directory - mode: 0770 - owner: "{{ matrix_user_username }}" - group: "{{ matrix_user_groupname }}" - when: "matrix_conduit_enabled|bool" - -- import_tasks: "{{ role_path }}/tasks/conduit/setup.yml" diff --git a/roles/matrix-conduit/templates/conduit/conduit.toml.j2 b/roles/matrix-conduit/templates/conduit/conduit.toml.j2 index f92910e1..6f479084 100644 --- a/roles/matrix-conduit/templates/conduit/conduit.toml.j2 +++ b/roles/matrix-conduit/templates/conduit/conduit.toml.j2 @@ -35,14 +35,14 @@ port = {{ matrix_conduit_port_number }} max_request_size = {{ matrix_conduit_max_request_size }} # Enables registration. If set to false, no users can register on this server. -allow_registration = {{ matrix_conduit_allow_registration | to_json | replace("\"", "") }} +allow_registration = {{ matrix_conduit_allow_registration | to_json }} -allow_federation = {{ matrix_conduit_allow_federation | to_json | replace("\"", "") }} +allow_federation = {{ matrix_conduit_allow_federation | to_json }} # Enable the display name lightning bolt on registration. -enable_lightning_bolt = {{ matrix_conduit_enable_lightning_bolt | to_json | replace("\"", "") }} +enable_lightning_bolt = {{ matrix_conduit_enable_lightning_bolt | to_json }} -trusted_servers = {{ matrix_conduit_trusted_servers }} +trusted_servers = {{ matrix_conduit_trusted_servers | to_json }} max_concurrent_requests = {{ matrix_conduit_max_concurrent_requests }}