--- - name: "Copy homeserver-config to: /etc/synapse/homeserver.yaml" copy: content: "#\n# !!! This file is managed by Ansible !!!\n#\n\n{{ services.synapse.homeserverConfig | to_nice_yaml }}\nlog_config: '/etc/synapse/log.yaml'\n" dest: "/etc/synapse/homeserver.yaml" mode: 0655 owner: synapse group: synapse notify: "Restart synapse" - name: "Copy log-config to: /etc/synapse/log.yaml" copy: content: "#\n# !!! This file is managed by Ansible !!!\n#\n\n{{ services.synapse.logConfig | to_nice_yaml }}" dest: "/etc/synapse/log.yaml" mode: 0655 owner: synapse group: synapse notify: "Restart synapse" - name: "[Alpine] Copy web-config to: /etc/riot-web/config.json" copy: src: "{{ services.synapse.webClient.configFile }}" dest: "/etc/riot-web/config.json" mode: 0644 when: - system.enableOwnRepos is false - ansible_distribution == "Alpine" - services.synapse.webClient.enable is defined - services.synapse.webClient.enable is true - name: "[Alpine] Copy web-config to: /etc/schildichat-web/config.json" copy: src: "{{ services.synapse.webClient.configFile }}" dest: "/etc/schildichat-web/config.json" mode: 0644 when: - system.enableOwnRepos is true - ansible_distribution == "Alpine" - services.synapse.webClient.enable is defined - services.synapse.webClient.enable is true - name: "[Archlinux] Copy web-config to: /etc/webapps/element/config.json" copy: src: "{{ services.synapse.webClientConfig }}" dest: "/etc/webapps/element/config.json" mode: 0644 when: - ansible_distribution == "Archlinux" - services.synapse.webClient.enable is defined - services.synapse.webClient.enable is true - name: "[Alpine] Create directory: /var/log/synapse" file: path: "/var/log/synapse" state: directory mode: 0755 owner: synapse group: synapse when: - ansible_distribution == "Alpine" - name: Create PostgreSQL-database for Synapse become: yes become_user: postgres community.postgresql.postgresql_db: name: synapse encoding: UTF-8 lc_collate: C lc_ctype: C template: template0 when: services.synapse.setupPostgreSQL is true - name: Create PostgreSQL-user for Synapse become: yes become_user: postgres community.postgresql.postgresql_user: db: synapse name: synapse when: services.synapse.setupPostgreSQL is true - name: Grant all privileges become: yes become_user: postgres community.postgresql.postgresql_privs: db: synapse privs: ALL type: database role: synapse when: services.synapse.setupPostgreSQL is true