Use the '-p' non-interactive option to generate password hash instead of 'expect'

This commit is contained in:
Lyubomir Popov
2019-05-03 11:02:17 +03:00
parent 134faa3139
commit a206b65ed7
4 changed files with 1 additions and 40 deletions

View File

@ -79,9 +79,3 @@
dest: "/usr/local/bin/matrix-synapse-register-user"
mode: 0750
- name: Ensure matrix-synapse-generate-password-hash script created
template:
src: "{{ role_path }}/templates/synapse/usr-local-bin/matrix-synapse-generate-password-hash.j2"
dest: "/usr/local/bin/matrix-synapse-generate-password-hash"
mode: 0750

View File

@ -41,7 +41,7 @@
when: postgres_start_result.changed
- name: Generate password hash
shell: "/usr/local/bin/matrix-synapse-generate-password-hash {{ password }}"
shell: "/usr/bin/docker exec matrix-synapse /usr/local/bin/hash_password -c /data/homeserver.yaml -p {{ password }}"
register: password_hash
- name: Update user password hash