| @@ -795,6 +795,8 @@ matrix_mautrix_discord_systemd_required_services_list: | | |||||
| matrix_mautrix_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.as.tok', rounds=655555) | to_uuid }}" | matrix_mautrix_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.as.tok', rounds=655555) | to_uuid }}" | ||||
| matrix_mautrix_discord_homeserver_public_address: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}://{{ matrix_server_fqn_matrix }}" | |||||
| matrix_mautrix_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.hs.tok', rounds=655555) | to_uuid }}" | matrix_mautrix_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.hs.tok', rounds=655555) | to_uuid }}" | ||||
| matrix_mautrix_discord_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}" | matrix_mautrix_discord_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}" | ||||
| @@ -2154,7 +2156,7 @@ matrix_cactus_comments_enabled: false | |||||
| matrix_cactus_comments_as_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.as.token', rounds=655555) | to_uuid }}" | matrix_cactus_comments_as_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.as.token', rounds=655555) | to_uuid }}" | ||||
| matrix_cactus_comments_hs_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.hs.token', rounds=655555) | to_uuid }}" | matrix_cactus_comments_hs_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.hs.token', rounds=655555) | to_uuid }}" | ||||
| matrix_cactus_comments_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}" | |||||
| matrix_cactus_comments_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}" | |||||
| matrix_cactus_comments_systemd_required_services_list: | | matrix_cactus_comments_systemd_required_services_list: | | ||||
| {{ | {{ | ||||
| (['docker.service']) | (['docker.service']) | ||||
| @@ -22,6 +22,7 @@ matrix_mautrix_discord_data_path: "{{ matrix_mautrix_discord_base_path }}/data" | |||||
| matrix_mautrix_discord_docker_src_files_path: "{{ matrix_mautrix_discord_base_path }}/docker-src" | matrix_mautrix_discord_docker_src_files_path: "{{ matrix_mautrix_discord_base_path }}/docker-src" | ||||
| matrix_mautrix_discord_homeserver_address: "{{ matrix_homeserver_container_url }}" | matrix_mautrix_discord_homeserver_address: "{{ matrix_homeserver_container_url }}" | ||||
| matrix_mautrix_discord_homeserver_public_address: '' | |||||
| matrix_mautrix_discord_homeserver_domain: "{{ matrix_domain }}" | matrix_mautrix_discord_homeserver_domain: "{{ matrix_domain }}" | ||||
| matrix_mautrix_discord_appservice_address: "http://matrix-mautrix-discord:8080" | matrix_mautrix_discord_appservice_address: "http://matrix-mautrix-discord:8080" | ||||
| @@ -8,4 +8,5 @@ | |||||
| with_items: | with_items: | ||||
| - {'name': 'matrix_mautrix_discord_appservice_token', when: true} | - {'name': 'matrix_mautrix_discord_appservice_token', when: true} | ||||
| - {'name': 'matrix_mautrix_discord_homeserver_token', when: true} | - {'name': 'matrix_mautrix_discord_homeserver_token', when: true} | ||||
| - {'name': 'matrix_mautrix_discord_homeserver_public_address', when: true} | |||||
| - {'name': 'matrix_mautrix_discord_database_hostname', when: "{{ matrix_mautrix_discord_database_engine == 'postgres' }}"} | - {'name': 'matrix_mautrix_discord_database_hostname', when: "{{ matrix_mautrix_discord_database_engine == 'postgres' }}"} | ||||
| @@ -3,8 +3,11 @@ | |||||
| homeserver: | homeserver: | ||||
| # The address that this appservice can use to connect to the homeserver. | # The address that this appservice can use to connect to the homeserver. | ||||
| address: {{ matrix_mautrix_discord_homeserver_address | to_json }} | address: {{ matrix_mautrix_discord_homeserver_address | to_json }} | ||||
| # Publicly accessible base URL for media, used for avatars in relay mode. | |||||
| # If not set, the connection address above will be used. | |||||
| public_address: {{ matrix_mautrix_discord_homeserver_public_address | to_json }} | |||||
| # The domain of the homeserver (for MXIDs, etc). | # The domain of the homeserver (for MXIDs, etc). | ||||
| domain: {{ matrix_mautrix_discord_homeserver_domain | to_json }} | |||||
| domain: {{ matrix_mautrix_discord_homeserver_domain | to_json }} | |||||
| # Is the homeserver actually mautrix-asmux? | # Is the homeserver actually mautrix-asmux? | ||||
| asmux: false | asmux: false | ||||
| # The URL to push real-time bridge status to. | # The URL to push real-time bridge status to. | ||||
| @@ -21,11 +24,11 @@ homeserver: | |||||
| appservice: | appservice: | ||||
| # The address that the homeserver can use to connect to this appservice. | # The address that the homeserver can use to connect to this appservice. | ||||
| address: {{ matrix_mautrix_discord_appservice_address | to_json }} | address: {{ matrix_mautrix_discord_appservice_address | to_json }} | ||||
| # The hostname and port where this appservice should listen. | # The hostname and port where this appservice should listen. | ||||
| hostname: 0.0.0.0 | hostname: 0.0.0.0 | ||||
| port: 8080 | port: 8080 | ||||
| # Database config. | # Database config. | ||||
| database: | database: | ||||
| # The database type. "sqlite3" and "postgres" are supported. | # The database type. "sqlite3" and "postgres" are supported. | ||||
| @@ -42,7 +45,7 @@ appservice: | |||||
| # Parsed with https://pkg.go.dev/time#ParseDuration | # Parsed with https://pkg.go.dev/time#ParseDuration | ||||
| max_conn_idle_time: null | max_conn_idle_time: null | ||||
| max_conn_lifetime: null | max_conn_lifetime: null | ||||
| # The unique ID of this appservice. | # The unique ID of this appservice. | ||||
| id: discord | id: discord | ||||
| # Appservice bot details. | # Appservice bot details. | ||||
| @@ -56,7 +59,7 @@ appservice: | |||||
| # Whether or not to receive ephemeral events via appservice transactions. | # Whether or not to receive ephemeral events via appservice transactions. | ||||
| # Requires MSC2409 support (i.e. Synapse 1.22+). | # Requires MSC2409 support (i.e. Synapse 1.22+). | ||||
| ephemeral_events: true | ephemeral_events: true | ||||
| # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify. | # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify. | ||||
| as_token: {{ matrix_mautrix_discord_appservice_token | to_json }} | as_token: {{ matrix_mautrix_discord_appservice_token | to_json }} | ||||
| hs_token: {{ matrix_mautrix_discord_homeserver_token | to_json }} | hs_token: {{ matrix_mautrix_discord_homeserver_token | to_json }} | ||||
| @@ -126,10 +129,10 @@ bridge: | |||||
| # instead of users having to find an access token and run `login-matrix` | # instead of users having to find an access token and run `login-matrix` | ||||
| # manually. | # manually. | ||||
| login_shared_secret_map: {{ matrix_mautrix_discord_bridge_login_shared_secret_map|to_json }} | login_shared_secret_map: {{ matrix_mautrix_discord_bridge_login_shared_secret_map|to_json }} | ||||
| # The prefix for commands. Only required in non-management rooms. | # The prefix for commands. Only required in non-management rooms. | ||||
| command_prefix: "{{ matrix_mautrix_discord_command_prefix }}" | command_prefix: "{{ matrix_mautrix_discord_command_prefix }}" | ||||
| # Messages sent upon joining a management room. | # Messages sent upon joining a management room. | ||||
| # Markdown is supported. The defaults are listed below. | # Markdown is supported. The defaults are listed below. | ||||
| management_room_text: | management_room_text: | ||||
| @@ -141,7 +144,7 @@ bridge: | |||||
| welcome_unconnected: "Use `help` for help or `login` to log in." | welcome_unconnected: "Use `help` for help or `login` to log in." | ||||
| # Optional extra text sent when joining a management room. | # Optional extra text sent when joining a management room. | ||||
| additional_help: "" | additional_help: "" | ||||
| # End-to-bridge encryption support options. | # End-to-bridge encryption support options. | ||||
| # | # | ||||
| # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info. | # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info. | ||||
| @@ -190,7 +193,7 @@ bridge: | |||||
| # session before changing it. The Matrix spec recommends 100 as the | # session before changing it. The Matrix spec recommends 100 as the | ||||
| # default. | # default. | ||||
| messages: 100 | messages: 100 | ||||
| # Settings for provisioning API | # Settings for provisioning API | ||||
| provisioning: | provisioning: | ||||
| # Prefix for the provisioning API paths. | # Prefix for the provisioning API paths. | ||||
| @@ -198,7 +201,7 @@ bridge: | |||||
| # Shared secret for authentication. If set to "generate", a random secret will be generated, | # Shared secret for authentication. If set to "generate", a random secret will be generated, | ||||
| # or if set to "disable", the provisioning API will be disabled. | # or if set to "disable", the provisioning API will be disabled. | ||||
| shared_secret: generate | shared_secret: generate | ||||
| # Permissions for using the bridge. | # Permissions for using the bridge. | ||||
| # Permitted values: | # Permitted values: | ||||
| # relay - Talk through the relaybot (if enabled), no access otherwise | # relay - Talk through the relaybot (if enabled), no access otherwise | ||||
| @@ -52,10 +52,10 @@ matrix_cactus_comments_client_nginx_path: "/cactus-comments/" | |||||
| matrix_cactus_comments_client_endpoint: "/cactus-comments/" | matrix_cactus_comments_client_endpoint: "/cactus-comments/" | ||||
| # List of systemd services that matrix-cactus-comments.service depends on | # List of systemd services that matrix-cactus-comments.service depends on | ||||
| matrix_bot_cactus_comments_systemd_required_services_list: ['docker.service'] | |||||
| matrix_cactus_comments_systemd_required_services_list: ['docker.service'] | |||||
| # List of systemd services that matrix-cactus-comments.service wants | # List of systemd services that matrix-cactus-comments.service wants | ||||
| matrix_bot_cactus_comments_systemd_wanted_services_list: [] | |||||
| matrix_cactus_comments_systemd_wanted_services_list: [] | |||||
| # A list of extra arguments to pass to the container | # A list of extra arguments to pass to the container | ||||
| matrix_cactus_comments_container_extra_arguments: [] | matrix_cactus_comments_container_extra_arguments: [] | ||||
| @@ -1,6 +1,6 @@ | |||||
| --- | --- | ||||
| - name: Fail if required settings not defined | |||||
| - name: Fail if required matrix-cactus-comments settings not defined | |||||
| ansible.builtin.fail: | ansible.builtin.fail: | ||||
| msg: >- | msg: >- | ||||
| You need to define a required configuration setting (`{{ item }}`). | You need to define a required configuration setting (`{{ item }}`). | ||||
| @@ -8,3 +8,13 @@ | |||||
| with_items: | with_items: | ||||
| - "matrix_cactus_comments_as_token" | - "matrix_cactus_comments_as_token" | ||||
| - "matrix_cactus_comments_hs_token" | - "matrix_cactus_comments_hs_token" | ||||
| - name: (Deprecation) Catch and report renamed matrix-cactus-comments settings | |||||
| ansible.builtin.fail: | |||||
| msg: >- | |||||
| Your configuration contains a variable, which now has a different name. | |||||
| Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`). | |||||
| when: "item.old in vars" | |||||
| with_items: | |||||
| - {'old': 'matrix_bot_cactus_comments_systemd_required_services_list', 'new': 'matrix_cactus_comments_systemd_required_services_list'} | |||||
| - {'old': 'matrix_bot_cactus_comments_systemd_wanted_services_list', 'new': 'matrix_cactus_comments_systemd_wanted_services_list'} | |||||
| @@ -1,11 +1,11 @@ | |||||
| #jinja2: lstrip_blocks: "True" | #jinja2: lstrip_blocks: "True" | ||||
| [Unit] | [Unit] | ||||
| Description=Cactus Comments | Description=Cactus Comments | ||||
| {% for service in matrix_bot_cactus_comments_systemd_required_services_list %} | |||||
| {% for service in matrix_cactus_comments_systemd_required_services_list %} | |||||
| Requires={{ service }} | Requires={{ service }} | ||||
| After={{ service }} | After={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| {% for service in matrix_bot_cactus_comments_systemd_wanted_services_list %} | |||||
| {% for service in matrix_cactus_comments_systemd_wanted_services_list %} | |||||
| Wants={{ service }} | Wants={{ service }} | ||||
| {% endfor %} | {% endfor %} | ||||
| DefaultDependencies=no | DefaultDependencies=no | ||||