How to configure OpenStackClient to use the controller's public address?

asked 2018-05-28 10:06:46 -0600

anonymous user



I'm currently working on a private Openstack cloud remotely. Let's say the public address to access to the dashboard is 180.X.X.X.

The endpoints listed on the dashboard are something like : - compute : http://controller:8774/v2.1 - identity : http://controller:5000/v3 (the default configuration).

The problem is that when I try to use the Openstack/Nova CLI, I authenticate with the url : 180.X.X.X:5000/v3/auth/token. Then when i try to run for example "server list" : it says target unreachable. And the URL used is http://controller:8774/server/detail instead of 180.X.X.X:8774/server/detail.

I know I can trick it by doing : openstack --os-token $OS_TOKEN --os-url http://180.X.X.X:8774/ \ server list

But since I want to run ansible playbook to automatise vm deployment and configuration, this trick won't work.

So is there a way to without touching the Cloud's endpoints, to tell the openstack client or ansible to use the public address.

Thanks ! Best regards.

edit retag flag offensive close merge delete