Ver a proveniência

/usr/local/bin/matrix-synapse-register-user -> /matrix/synapse/bin/register-user

pull/2304/head
Slavi Pantaleev há 3 anos
ascendente
cometimento
72744f9db9
6 ficheiros alterados com 8 adições e 11 eliminações
  1. +1
    -1
      docs/registering-users.md
  2. +1
    -0
      roles/custom/matrix-synapse/defaults/main.yml
  3. +2
    -1
      roles/custom/matrix-synapse/tasks/register_user.yml
  4. +1
    -0
      roles/custom/matrix-synapse/tasks/setup_install.yml
  5. +3
    -9
      roles/custom/matrix-synapse/tasks/synapse/setup_install.yml
  6. +0
    -0
      roles/custom/matrix-synapse/templates/synapse/bin/register-user.j2

+ 1
- 1
docs/registering-users.md Ver ficheiro

@@ -23,7 +23,7 @@ ansible-playbook -i inventory/hosts setup.yml --extra-vars='username=<your-usern
**or** using the command-line after **SSH**-ing to your server (requires that [all services have been started](#starting-the-services)): **or** using the command-line after **SSH**-ing to your server (requires that [all services have been started](#starting-the-services)):


``` ```
/usr/local/bin/matrix-synapse-register-user <your-username> <your-password> <admin access: 0 or 1>
/matrix/synapse/bin/register-user <your-username> <your-password> <admin access: 0 or 1>
``` ```


**Note**: `<your-username>` is just a plain username (like `john`), not your full `@<username>:<your-domain>` identifier. **Note**: `<your-username>` is just a plain username (like `john`), not your full `@<username>:<your-domain>` identifier.


+ 1
- 0
roles/custom/matrix-synapse/defaults/main.yml Ver ficheiro

@@ -55,6 +55,7 @@ matrix_synapse_config_dir_path: "{{ matrix_synapse_base_path }}/config"
matrix_synapse_storage_path: "{{ matrix_synapse_base_path }}/storage" matrix_synapse_storage_path: "{{ matrix_synapse_base_path }}/storage"
matrix_synapse_media_store_path: "{{ matrix_synapse_storage_path }}/media-store" matrix_synapse_media_store_path: "{{ matrix_synapse_storage_path }}/media-store"
matrix_synapse_ext_path: "{{ matrix_synapse_base_path }}/ext" matrix_synapse_ext_path: "{{ matrix_synapse_base_path }}/ext"
matrix_synapse_bin_path: "{{ matrix_synapse_base_path }}/bin"
matrix_synapse_ext_s3_storage_provider_path: "{{ matrix_synapse_base_path }}/ext/s3-storage-provider" matrix_synapse_ext_s3_storage_provider_path: "{{ matrix_synapse_base_path }}/ext/s3-storage-provider"


matrix_synapse_container_client_api_port: 8008 matrix_synapse_container_client_api_port: 8008


+ 2
- 1
roles/custom/matrix-synapse/tasks/register_user.yml Ver ficheiro

@@ -28,6 +28,7 @@
when: "start_result.changed" when: "start_result.changed"


- name: Register user - name: Register user
ansible.builtin.command: "{{ matrix_local_bin_path }}/matrix-synapse-register-user {{ username | quote }} {{ password | quote }} {{ '1' if admin == 'yes' else '0' }}"
ansible.builtin.command:
cmd: "{{ matrix_synapse_bin_path }}/register-user {{ username | quote }} {{ password | quote }} {{ '1' if admin == 'yes' else '0' }}"
register: matrix_synapse_register_user_result register: matrix_synapse_register_user_result
changed_when: matrix_synapse_register_user_result.rc == 0 changed_when: matrix_synapse_register_user_result.rc == 0

+ 1
- 0
roles/custom/matrix-synapse/tasks/setup_install.yml Ver ficheiro

@@ -10,6 +10,7 @@
with_items: with_items:
- {path: "{{ matrix_synapse_config_dir_path }}", when: true} - {path: "{{ matrix_synapse_config_dir_path }}", when: true}
- {path: "{{ matrix_synapse_ext_path }}", when: true} - {path: "{{ matrix_synapse_ext_path }}", when: true}
- {path: "{{ matrix_synapse_bin_path }}", when: true}
- {path: "{{ matrix_synapse_docker_src_files_path }}", when: "{{ matrix_synapse_container_image_self_build }}"} - {path: "{{ matrix_synapse_docker_src_files_path }}", when: "{{ matrix_synapse_container_image_self_build }}"}
- {path: "{{ matrix_synapse_customized_docker_src_files_path }}", when: "{{ matrix_synapse_container_image_customizations_enabled }}"} - {path: "{{ matrix_synapse_customized_docker_src_files_path }}", when: "{{ matrix_synapse_container_image_customizations_enabled }}"}
- {path: "{{ matrix_synapse_ext_s3_storage_provider_path }}", when: "{{ matrix_synapse_ext_synapse_s3_storage_provider_enabled }}"} - {path: "{{ matrix_synapse_ext_s3_storage_provider_path }}", when: "{{ matrix_synapse_ext_synapse_s3_storage_provider_enabled }}"}


+ 3
- 9
roles/custom/matrix-synapse/tasks/synapse/setup_install.yml Ver ficheiro

@@ -127,17 +127,11 @@
src: "{{ role_path }}/templates/synapse/systemd/matrix-synapse.service.j2" src: "{{ role_path }}/templates/synapse/systemd/matrix-synapse.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-synapse.service"
mode: 0644 mode: 0644
register: matrix_synapse_systemd_service_result


- name: Ensure systemd reloaded after matrix-synapse.service installation
ansible.builtin.service:
daemon_reload: true
when: "matrix_synapse_systemd_service_result.changed"

- name: Ensure matrix-synapse-register-user script created
- name: Ensure register-user script created
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/synapse/usr-local-bin/matrix-synapse-register-user.j2"
dest: "{{ matrix_local_bin_path }}/matrix-synapse-register-user"
src: "{{ role_path }}/templates/synapse/bin/register-user.j2"
dest: "{{ matrix_synapse_bin_path }}/register-user"
mode: 0755 mode: 0755


- name: Generate sample prometheus.yml for external scraping - name: Generate sample prometheus.yml for external scraping


roles/custom/matrix-synapse/templates/synapse/usr-local-bin/matrix-synapse-register-user.j2 → roles/custom/matrix-synapse/templates/synapse/bin/register-user.j2 Ver ficheiro


Carregando…
Cancelar
Guardar