spantaleev / matrix-docker-ansible-deploy

🐳 Matrix (An open network for secure, decentralized communication) server setup using Ansible and Docker
GNU Affero General Public License v3.0
4.89k stars 1.04k forks source link

TASK [matrix-base : Fail if matrix_homeserver_generic_secret_key is undefined] #1856

Closed Seldos closed 2 years ago

Seldos commented 2 years ago

Playbook Configuration:

My vars.yml file looks like this:

---
# The bare domain name which represents your Matrix identity.
# Matrix user ids for your server will be of the form (`@user:<matrix-domain>`).
#
# Note: this playbook does not touch the server referenced here.
# Installation happens on another server ("matrix.<matrix-domain>").
#
# If you've deployed using the wrong domain, you'll have to run the Uninstalling step,
# because you can't change the Domain after deployment.
#
# Example value: example.com
matrix_domain: elementtesting.com

# The Matrix homeserver software to install.
# See `roles/matrix-base/defaults/main.yml` for valid options.
matrix_homeserver_implementation: synapse

# A secret used as a base, for generating various other secrets.
# You can put any string here, but generating a strong one is preferred (e.g. `pwgen -s 64 1`).
matrix_homeserver_generic_secret_key: 'deleted but in my File i have actually defined it'

# This is something which is provided to Let's Encrypt when retrieving SSL certificates for domains.
#
# In case SSL renewal fails at some point, you'll also get an email notification there.
#
# If you decide to use another method for managing SSL certificates (different than the default Let's Encrypt),
# you won't be required to define this variable (see `docs/configuring-playbook-ssl-certificates.md`).
#
# Example value: someone@example.com
matrix_ssl_lets_encrypt_support_email: ''

# A Postgres password to use for the superuser Postgres user (called `matrix` by default).
#
# The playbook creates additional Postgres users and databases (one for each enabled service)
# using this superuser account.
matrix_postgres_connection_password: ''

matrix_synapse_ext_password_provider_shared_secret_auth_enabled: true
matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret: ""

matrix_mautrix_telegram_enabled: true
matrix_mautrix_telegram_api_id: ""
matrix_mautrix_telegram_api_hash: ""

matrix_mautrix_whatsapp_enabled: true

matrix_mautrix_instagram_enabled: true

matrix_mautrix_twitter_enabled: true

matrix_mautrix_signal_enabled: true

matrix_appservice_discord_enabled: true
matrix_appservice_discord_client_id: ""
matrix_appservice_discord_bot_token: ""

Matrix Server:

Ansible: If your problem appears to be with Ansible, tell us: Running on the Matrix Server itself Raspberry Pi OS - latest version Version: 3.9.2 standard installation

Problem description:

TASK [matrix-base : Fail if matrix_homeserver_generic_secret_key is undefined] *** fatal: [matrix.elementtesting.com]: FAILED! => changed=false msg: |- Thematrix_homeserver_generic_secret_key` variable must be defined and have a non-null and non-empty value.

If you're observing this error on a new installation, you should ensure that the `matrix_homeserver_generic_secret_key` is defined.

If you're observing this error on an existing homeserver installation, you can fix it easily and in a backward-compatible way by adding
`matrix_homeserver_generic_secret_key: "{{ matrix_synapse_macaroon_secret_key }}"`
to your `vars.yml` file. Using another secret value for the new variable is also possible and shouldn't cause any trouble.

` Im getting this Error all the time, i read in another issue here on github that some other fixed it by naming his matrix.your-domain folder correctly but i dont know how it is named correctly

i named it "matrix.elementtesting.com", "matrix.elementtesting", "elementtesting", "elementtesting.com"

i tried chaning up the variable "matrix_domain" in the Vars.yml to "elementtesting.com", "elementtesting", "matrix.elementtesting.com", "matrix.elementtesting"

and it does not seem to fix the issue

Additional context i currently don't own the domain, but it does not seem to be the problem here in my opinion

aaronraimist commented 2 years ago

What does your inventory/hosts look like? The domain there needs to match the the folder name.

Seldos commented 2 years ago

[matrix_servers] matrix.elementtesting ansible_connection=local ansible_ssh_user=pi become=true become_user=root matrix_coturn_turn_external_ip_address=x.x.x.x

i also tried matrix.elementtesting.com

spantaleev commented 2 years ago

This likely means you have a typo in the hostname in inventory/hosts or in the directory path inventory/host_vars/matrix.DOMAIN/vars.yml. See if all directory and file names match.

Seldos commented 2 years ago

I copied the name of the folder into the hosts file so there should be no typo

My directory name is: /inventory/host_vars/matrix.elementtesting/vars.yml /inventory/hosts/hosts

i also tried changing up the name to something else but it doesn't help. I also changed the folder name to:

/inventory/host_vars/matrix.elementtesting.com/vars.yml /inventory/host_vars/elementtesting/vars.yml /inventory/host_vars/elementtesting.com/vars.yml

but i still get the same error.