--- - hosts: synapse # todo: create user for synapse vars: matrix_synapse_version: "v1.5.1-py3" # matrix_synapse_version: "v1.5.1" matrix_server_name: matrix-sonic-beta.local matrix_synapse_pg_host: synapse-postgres # matrix_synapse_pg_user: "" # matrix_synapse_pg_pass: "" # matrix_synapse_pg_db: "" matrix_synapse_report_stats: false # matrix_synapse_extra_config: # no_tls: true tasks: # - docker_volume: # name: synapse-data - template: src: templates/synapse_homeserver.yaml.j2 dest: /synapse-data/homeserver.yaml # - docker_container: # name: synapse-fuz-beta # required. Assign a name to a new container or match an existing container.,When identifying an existing container name may be a name or a long or short container ID. # image: "matrixdotorg/synapse:{{ matrix_synapse_version }}" # published_ports: 8008:8008 # domainname: undefined # not required. Container domainname. # # env_file: undefined # not required. Path to a file, present on the target, containing environment variables I(FOO=BAR).,If variable also present in C(env), then C(env) value will override. # hostname: undefined # not required. Container hostname. # state: started # env: # SYNAPSE_SERVER_NAME: "{{ matrix_server_name }}" # SYNAPSE_REPORT_STATS: {{ matrix_synapse_report_stats }} # # SYNAPSE_CONFIG_DIR: where additional config files (such as the log config and event signing key) will be stored. Defaults to /data. # # SYNAPSE_CONFIG_PATH: path to the file to be generated. Defaults to /homeserver.yaml. # # SYNAPSE_DATA_DIR: where the generated config will put persistent data such as the datatase and media store. Defaults to /data. # keep_volumes: yes # not required. Retain volumes associated with a removed container. # volumes: /synapse-data:/data # not required. List of volumes to mount within the container.,Use docker CLI-style syntax: C(/host:/container[:mode]),You can specify a read mode for the mount with either C(ro) or C(rw).,SELinux hosts can additionally use C(z) or C(Z) to use a shared or private label for the volume. # detach: true - template: src: templates/docker-compose-matrix.yml.j2 dest: /synapse-data/homeserver.yaml - name: Create and start matrix services docker_compose: project_src: matrix register: output