Skip to content

Conversation

@sck-v
Copy link

@sck-v sck-v commented Sep 30, 2019

I case when metabase_host is different than localhost, api calls fail

I case when `metabase_host` is different than localhost, api calls fail
@Matt-Yorkley
Copy link
Collaborator

Matt-Yorkley commented Sep 30, 2019

Hi @sck-v, what kind of setup are you using?

I tend to use nginx as a reverse proxy, with metabase running on localhost:3000 (on the remote server), then incoming requests to (for example) https://mymetabasehost.com get internally directed to the metabase instance. In this configuration, when Ansible runs the API call via SSH on the remote, Metabase is on http://localhost (from Ansible's position). It also means nginx can cleanly handle things like TLS certificates with Letsencrypt.

I'd be reluctant to merge this as it is, but maybe we could add a new variable metabase_api_host that defaults to localhost, and use that in the API tasks. Then you could override it as needed. How does that sound?

@sck-v
Copy link
Author

sck-v commented Sep 30, 2019

Hey, @Matt-Yorkley

In the configuration i'm using, there is a local network and metabase is bound to ansible's local_address. Saying there are two hosts: 192.168.0.10 and 192.168.0.20

There is a nginx on 192.168.0.10 as a reverse proxy and a metabase on 192.168.0.20. I'm binding metabase to 192.168.0.20 to be available to nginx. That's why requests to localhosts are failing for me

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

Successfully merging this pull request may close these issues.

2 participants