Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'host_specific_hostname_identity' is undefined #1

Closed
DrMoriarty opened this issue Jan 17, 2018 · 4 comments
Closed

'host_specific_hostname_identity' is undefined #1

DrMoriarty opened this issue Jan 17, 2018 · 4 comments

Comments

@DrMoriarty
Copy link

Hello!

I configured ansible as described in Readme file. When I run ansible-playbook -i inventory/hosts setup.yml --tags=setup-main I always get the error:

TASK [matrix-server : Determine domains to obtain certificates for (Matrix)] ***********************************************************************************************
fatal: [matrix.mobilap.ru]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: matrix.{{ hostname_identity }}: {{ host_specific_hostname_identity }}: 'host_specific_hostname_identity' is undefined\n\nThe error appears to have been in '/Volumes/ST1000/projects/WVV2/matrix-docker-ansible-deploy/roles/matrix-server/tasks/setup_ssl.yml': line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Determine domains to obtain certificates for (Matrix)\n  ^ here\n"}

PLAY RECAP *****************************************************************************************************************************************************************
matrix.mobilap.ru          : ok=11   changed=0    unreachable=0    failed=1  

I double checked that my vars.yml is correct and it contains host_specific_hostname_identity variable

@DrMoriarty
Copy link
Author

The only solution I have found is to add definitions of host_specific_matrix_ssl_support_email and host_specific_hostname_identity to roles/matrix-server/defaults/main.yml

@spantaleev
Copy link
Owner

Is your inventory host file (inventory/matrix.<your-domain>/vars.yml) based on the example file (examples/host-vars.yml) like the README says?

In that case, your inventory hostname file (inventory/matrix.<your-domain>/vars.yml) should already contain definitions for host_specific_matrix_ssl_support_email and host_specific_hostname_identity.

So unless you added these variables once again in roles/matrix-server/defaults/main.yml, it was showing that error?

Which version of Ansible is this and under which OS/distro?

@DrMoriarty
Copy link
Author

Yes, I copied examples/host-vars.yml to inventory/matrix.mobilap.ru/vars.yml then I set the values of this two parameters.

The error was in every run until I set this two additional variables in roles/matrix-server/defaults/main.yml

bash-3.2$ ansible --version
ansible 2.3.2.0
  config file = /Volumes/ST1000/projects/WVV2/matrix-docker-ansible-deploy/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.14 (default, Sep 22 2017, 00:06:07) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)]

MacOSX 10.12.6 (16G29)

@spantaleev
Copy link
Owner

Seems like the README instructions were incorrect.

They instructed you to create an inventory/matrix.<host> directory, but it actually should have been inventory/host_vars/matrix.<host> (there needs to be an extra host_vars directory level there).

Because of this, the host variables were not found and read by Ansible.

I have fixed the incorrect README instructions in edd97d3.

If you do a git pull and mv inventory/matrix.mobilap.ru inventory/host_vars/matrix.mobilap.ru you should be able to get it solved.

Thanks for reporting the problem, so we could get it fixed for everyone!

spantaleev pushed a commit that referenced this issue Jun 28, 2020
Actualizo con los cambios en el repositorio base de Slavi.
spantaleev pushed a commit that referenced this issue Sep 13, 2020
spantaleev added a commit that referenced this issue Mar 8, 2021
We have a flow like this:
1. matrix.DOMAIN vhost (matrix-domain.conf)
2. matrix-synapse vhost (matrix-synapse.conf); or matrix-corporal container, if enabled
3. (optional) matrix-synapse vhost (matrix-synapse.conf), if matrix-corporal enabled
4. matrix-synapse container

We are setting `X-Forwarded-For` correctly in step #1, but were
overwriting it in step #2 with something inaccurate.

Not doing anything in step #2 is better than doing the wrong thing.
It's probably best if we append another reverse-proxy address there
though, although what we're doing now (with this patch) seems to yield
the correct result (when matrix-corporal is not enabled).

When matrix-corporal is enabled, we still seem to do the wrong thing for
some reason. It's something to be fixed later on.
spantaleev pushed a commit that referenced this issue Aug 19, 2021
Update readme mautrix bridges
spantaleev pushed a commit that referenced this issue Dec 22, 2021
spantaleev pushed a commit that referenced this issue Jul 20, 2022
Add more database config options and other cleanup
jswetzen referenced this issue in jswetzen/matrix-docker-ansible-deploy Jul 21, 2022
Add matrix-nginx-proxy config for mautrix-wsproxy
spantaleev pushed a commit that referenced this issue Oct 16, 2022
add default for TG filter_mode
spantaleev pushed a commit that referenced this issue Dec 9, 2022
Fix Broken ma1sd Playbook Documentation Link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants