/usr/local/bin/matrix-dendrite-create-account -> /matrix/dendrite/bin/create-account

This commit is contained in:
Slavi Pantaleev 2022-11-27 09:41:03 +02:00
parent 7c5c3aedc4
commit 40cf9cd72c
5 changed files with 13 additions and 6 deletions

View File

@ -14,6 +14,7 @@ matrix_dendrite_config_dir_path: "{{ matrix_dendrite_base_path }}/config"
matrix_dendrite_storage_path: "{{ matrix_dendrite_base_path }}/storage" matrix_dendrite_storage_path: "{{ matrix_dendrite_base_path }}/storage"
matrix_dendrite_media_store_path: "{{ matrix_dendrite_storage_path }}/media-store" matrix_dendrite_media_store_path: "{{ matrix_dendrite_storage_path }}/media-store"
matrix_dendrite_nats_storage_path: "{{ matrix_dendrite_base_path }}/nats" matrix_dendrite_nats_storage_path: "{{ matrix_dendrite_base_path }}/nats"
matrix_dendrite_bin_path: "{{ matrix_dendrite_base_path }}/bin"
matrix_dendrite_ext_path: "{{ matrix_dendrite_base_path }}/ext" matrix_dendrite_ext_path: "{{ matrix_dendrite_base_path }}/ext"
# By default, we make Dendrite only serve HTTP (not HTTPS). # By default, we make Dendrite only serve HTTP (not HTTPS).

View File

@ -29,6 +29,6 @@
- name: Register user - name: Register user
ansible.builtin.command: ansible.builtin.command:
cmd: "{{ matrix_local_bin_path }}/matrix-dendrite-create-account {{ username | quote }} {{ password | quote }} {{ '1' if admin == 'yes' else '0' }}" cmd: "{{ {{ matrix_dendrite_bin_path }} }}/create-account {{ username | quote }} {{ password | quote }} {{ '1' if admin == 'yes' else '0' }}"
register: matrix_dendrite_register_user_result register: matrix_dendrite_register_user_result
changed_when: matrix_dendrite_register_user_result.rc == 0 changed_when: matrix_dendrite_register_user_result.rc == 0

View File

@ -9,6 +9,7 @@
group: "{{ matrix_user_groupname }}" group: "{{ matrix_user_groupname }}"
with_items: with_items:
- "{{ matrix_dendrite_config_dir_path }}" - "{{ matrix_dendrite_config_dir_path }}"
- "{{ matrix_dendrite_bin_path }}"
- "{{ matrix_dendrite_ext_path }}" - "{{ matrix_dendrite_ext_path }}"
- "{{ matrix_dendrite_nats_storage_path }}" - "{{ matrix_dendrite_nats_storage_path }}"
@ -81,8 +82,10 @@
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dendrite.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dendrite.service"
mode: 0644 mode: 0644
- name: Ensure matrix-dendrite-create-account script created - name: Ensure Dendrite scripts created
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/dendrite/usr-local-bin/matrix-dendrite-create-account.j2" src: "{{ role_path }}/templates/dendrite/bin/{{ item }}.j2"
dest: "{{ matrix_local_bin_path }}/matrix-dendrite-create-account" dest: "{{ matrix_dendrite_bin_path }}/{{ item }}"
mode: 0750 mode: 0750
with_items:
- create-account

View File

@ -13,7 +13,10 @@
state: stopped state: stopped
daemon_reload: true daemon_reload: true
- name: Ensure matrix-dendrite.service doesn't exist - name: Ensure Dendrite paths don't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dendrite.service" path: "{{ item }}"
state: absent state: absent
with_items:
- "{{ devture_systemd_docker_base_systemd_path }}/matrix-dendrite.service"
- "{{ matrix_dendrite_bin_path }}"