Fix typo Move mautrix variable in `defaults/main.yml` exclusivelypull/2/head
| @@ -26,9 +26,3 @@ matrix_coturn_turn_static_auth_secret: "" | |||||
| # You can put any string here, but generating a strong one is preferred (e.g. `pwgen -s 64 1`). | # You can put any string here, but generating a strong one is preferred (e.g. `pwgen -s 64 1`). | ||||
| matrix_synapse_macaroon_secret_key: "" | matrix_synapse_macaroon_secret_key: "" | ||||
| # Mautrix telegram | |||||
| # Enable telegram bridge | |||||
| matrix_mautrix_telegram_enabled: false | |||||
| # Get your own API keys at https://my.telegram.org/apps | |||||
| matrix_mautrix_telegram_api_id: YOUR_TELEGRAM_APP_ID | |||||
| matrix_mautrix_telegram_api_hash: YOUR_TELEGRAM_API_HASH | |||||
| @@ -86,7 +86,7 @@ matrix_synapse_additional_loggers: [] | |||||
| # A list of service config files | # A list of service config files | ||||
| # This list gets populated dynamically based on Synapse extensions that have been enabled. | # This list gets populated dynamically based on Synapse extensions that have been enabled. | ||||
| # Conatains fs paths | |||||
| # Contains fs paths | |||||
| matrix_synapse_app_service_config_files: [] | matrix_synapse_app_service_config_files: [] | ||||
| # This is set dynamically during execution depending on whether | # This is set dynamically during execution depending on whether | ||||
| @@ -219,9 +219,12 @@ matrix_riot_web_enabled: true | |||||
| matrix_riot_web_default_identity_server_url: "https://{{ matrix_synapse_trusted_third_party_id_servers[0] }}" | matrix_riot_web_default_identity_server_url: "https://{{ matrix_synapse_trusted_third_party_id_servers[0] }}" | ||||
| # Matrix mautrix is a Matrix <-> Telegram bridge | # Matrix mautrix is a Matrix <-> Telegram bridge | ||||
| # Enable telegram bridge | |||||
| matrix_mautrix_telegram_enabled: false | matrix_mautrix_telegram_enabled: false | ||||
| # Get your own API keys at https://my.telegram.org/apps | |||||
| matrix_mautrix_telegram_api_id: YOUR_TELEGRAM_APP_ID | |||||
| matrix_mautrix_telegram_api_hash: YOUR_TELEGRAM_API_HASH | |||||
| # By default, this playbook sets up its own nginx proxy server on port 80/443. | # By default, this playbook sets up its own nginx proxy server on port 80/443. | ||||
| @@ -14,6 +14,9 @@ | |||||
| group: "{{ matrix_user_username }}" | group: "{{ matrix_user_username }}" | ||||
| when: "matrix_mautrix_telegram_enabled" | when: "matrix_mautrix_telegram_enabled" | ||||
| - stat: "path={{ matrix_mautrix_telegram_base_path }}/config.yaml" | |||||
| register: mautrix_config_file | |||||
| - name: Ensure Matrix Mautrix telegram config installed | - name: Ensure Matrix Mautrix telegram config installed | ||||
| template: | template: | ||||
| src: "{{ role_path }}/templates/mautrix-telegram/config.yaml.j2" | src: "{{ role_path }}/templates/mautrix-telegram/config.yaml.j2" | ||||
| @@ -21,7 +24,7 @@ | |||||
| mode: 0644 | mode: 0644 | ||||
| owner: "{{ matrix_user_username }}" | owner: "{{ matrix_user_username }}" | ||||
| group: "{{ matrix_user_username }}" | group: "{{ matrix_user_username }}" | ||||
| when: "matrix_mautrix_telegram_enabled" | |||||
| when: "matrix_mautrix_telegram_enabled and mautrix_config_file.stat.exists == False" | |||||
| - name: Ensure matrix-mautrix-telegram.service installed | - name: Ensure matrix-mautrix-telegram.service installed | ||||
| template: | template: | ||||
| @@ -60,6 +63,6 @@ | |||||
| - name: Ensure matrix-mautrix-telegram.service doesn't exist | - name: Ensure matrix-mautrix-telegram.service doesn't exist | ||||
| file: | file: | ||||
| path: "{{ role_path }}/templates/systemd/matrix-mautrix-telegram.service.j2" | |||||
| path: "{{ role_path }}/templates/systemd/matrix-mautrix-telegram.service" | |||||
| state: absent | state: absent | ||||
| when: "not matrix_mautrix_telegram_enabled" | when: "not matrix_mautrix_telegram_enabled" | ||||
| @@ -206,7 +206,8 @@ bridge: | |||||
| # domain - All users on that homeserver | # domain - All users on that homeserver | ||||
| # mxid - Specific user | # mxid - Specific user | ||||
| permissions: | permissions: | ||||
| "*": "puppeting" | |||||
| '{{ hostname_identity }}': puppeting | |||||
| '*': relaybot | |||||
| # Options related to the message relay Telegram bot. | # Options related to the message relay Telegram bot. | ||||
| relaybot: | relaybot: | ||||