mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-08-05 22:41:32 +02:00
docs
examples
group_vars
inventory
roles
matrix-base
matrix-bridge-appservice-discord
matrix-bridge-appservice-irc
matrix-bridge-mautrix-facebook
matrix-bridge-mautrix-telegram
matrix-bridge-mautrix-whatsapp
matrix-common-after
matrix-corporal
matrix-coturn
matrix-dimension
matrix-mailer
matrix-mxisd
matrix-nginx-proxy
matrix-postgres
defaults
tasks
templates
systemd
usr-local-bin
matrix-make-user-admin.j2
matrix-postgres-cli.j2
matrix-postgres-update-user-password-hash.j2
env-postgres-psql.j2
env-postgres-server.j2
matrix-riot-web
matrix-synapse
.editorconfig
.gitignore
CHANGELOG.md
LICENSE
README.md
ansible.cfg
setup.yml
Use Jinja2 lstrip_blocks option in templates to ensure consistent indentation in generated files.
17 lines
502 B
Django/Jinja
17 lines
502 B
Django/Jinja
#jinja2: lstrip_blocks: "True"
|
|
#!/bin/bash
|
|
|
|
if [ $# -ne 2 ]; then
|
|
echo "Usage: "$0" <username> <password_hash>"
|
|
exit 1
|
|
fi
|
|
|
|
docker run \
|
|
--rm \
|
|
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
|
--cap-drop=ALL \
|
|
--env-file={{ matrix_postgres_base_path }}/env-postgres-psql \
|
|
--network {{ matrix_docker_network }} \
|
|
{{ matrix_postgres_docker_image_to_use }} \
|
|
psql -h {{ matrix_postgres_connection_hostname }} -c "UPDATE users set password_hash='$2' WHERE name = '@$1:{{ matrix_domain }}'"
|