# problem using os\_loadbalancer task with keystone

**URL:** <https://forum.ansible.com/t/problem-using-os-loadbalancer-task-with-keystone/29175>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [December 3, 2018, 10:58am UTC](https://forum.ansible.com/t/problem-using-os-loadbalancer-task-with-keystone/29175 "2018-12-03T10:58:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergio\_Traldi](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@Sergio\_Traldi](https://forum.ansible.com/u/Sergio_Traldi)\
**Post date:** [December 3, 2018, 10:58am UTC](https://forum.ansible.com/t/problem-using-os-loadbalancer-task-with-keystone/29175/1 "2018-12-03T10:58:26Z")

</div>

Hi,  
I have a host with ubuntu 18\_04 and ansible 2.7:

# dpkg --list | grep ansible

ii ansible 2.7.3-1ppa~bionic all Ansible IT Automation

and openstacksdk and pyhon-shade:

# dpkg --list | grep shade

ii python-shade 1.7.0-2 all Client library for operating OpenStack clouds

# dpkg --list | grep openstack

ii python-openstacksdk 0.17.2-0ubuntu1 all SDK for building applications to work with OpenStack - Python 2.x

I can create some virtual machine and security group on an Openstack infrastructure without problem.

When I try to create a load balancer I have the error:  
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: keystoneauth1.exceptions.catalog.EndpointNotFound: public endpoint for load-balancer service not found

I have souced the openstackrc file and I put also the auth in the os\_loadbalancer task.

My yaml ansible file is:

# cat deploy\_lbaas\_openstack.yaml

- name: Create a Load balancer for 3 hosts  
hosts: localhost  
tasks:

- name: Create the load balancer  
os\_loadbalancer:  
auth:  
auth\_url: [http://192.168.60.170:5000/v3](http://192.168.60.170:5000/v3)  
username: admin  
password: 155830c66cc4a9a  
project\_name: admin  
interface: public  
state: present  
name: lbk8ansible  
vip\_subnet: private\_subnet  
timeout: 150

- name: Create the listener  
os\_listener:  
state: present  
name: test-k8-listener  
loadbalancer: lbk8ansible  
protocol: TCP  
protocol\_port: 6443

- name: Create the pool  
os\_pool:  
state: present  
name: test-k8-pool  
loadbalancer: lbk8ansiblei  
listener: test-k8-listener  
protocol: TCP  
lb\_algorithm: ROUND\_ROBIN

If I use -vvv the error is:  
The full traceback is:  
Traceback (most recent call last):  
File “/root/.ansible/tmp/ansible-tmp-1543834531.05-62995379178532/AnsiballZ\_os\_loadbalancer.py”, line 113, in   
\_ansiballz\_main()  
File “/root/.ansible/tmp/ansible-tmp-1543834531.05-62995379178532/AnsiballZ\_os\_loadbalancer.py”, line 105, in \_ansiballz\_main  
invoke\_module(zipped\_mod, temp\_path, ANSIBALLZ\_PARAMS)  
File “/root/.ansible/tmp/ansible-tmp-1543834531.05-62995379178532/AnsiballZ\_os\_loadbalancer.py”, line 48, in invoke\_module  
imp.load\_module(‘ **main** ’, mod, module, MOD\_DESC)  
File “/tmp/ansible\_os\_loadbalancer\_payload\_su7EfG/ **main**.py”, line 258, in   
File “/tmp/ansible\_os\_loadbalancer\_payload\_su7EfG/ **main**.py”, line 195, in main  
File “/usr/lib/python2.7/dist-packages/openstack/load\_balancer/v2/\_proxy.py”, line 94, in find\_load\_balancer  
ignore\_missing=ignore\_missing)  
File “/usr/lib/python2.7/dist-packages/openstack/proxy.py”, line 111, in \_find  
\*\*attrs)  
File “/usr/lib/python2.7/dist-packages/openstack/resource.py”, line 1061, in find  
return match.get(session)  
File “/usr/lib/python2.7/dist-packages/openstack/resource.py”, line 782, in get  
response = session.get(request.url)  
File “/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py”, line 328, in get  
return self.request(url, ‘GET’, \*\*kwargs)  
File “/usr/lib/python2.7/dist-packages/openstack/\_adapter.py”, line 145, in request  
\*\*kwargs)  
File “/usr/lib/python2.7/dist-packages/openstack/task\_manager.py”, line 149, in submit\_function  
return self.submit\_task(task)  
File “/usr/lib/python2.7/dist-packages/openstack/task\_manager.py”, line 138, in submit\_task  
return task.wait()  
File “/usr/lib/python2.7/dist-packages/openstack/task\_manager.py”, line 79, in wait  
self.\_traceback)  
File “/usr/lib/python2.7/dist-packages/openstack/task\_manager.py”, line 87, in run  
self.done(self.main())  
File “/usr/lib/python2.7/dist-packages/openstack/task\_manager.py”, line 59, in main  
return self.\_main(\*self.args, \*\*self.kwargs)  
File “/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py”, line 213, in request  
return self.session.request(url, method, \*\*kwargs)  
File “/usr/lib/python2.7/dist-packages/keystoneauth1/session.py”, line 706, in request  
\*\*endpoint\_filter)  
File “/usr/lib/python2.7/dist-packages/keystoneauth1/session.py”, line 1113, in get\_endpoint  
return auth.get\_endpoint(self, \*\*kwargs)  
File “/usr/lib/python2.7/dist-packages/keystoneauth1/identity/base.py”, line 380, in get\_endpoint  
allow\_version\_hack=allow\_version\_hack, \*\*kwargs)  
File “/usr/lib/python2.7/dist-packages/keystoneauth1/identity/base.py”, line 279, in get\_endpoint\_data  
service\_name=service\_name)  
File “/usr/lib/python2.7/dist-packages/keystoneauth1/access/service\_catalog.py”, line 462, in endpoint\_data\_for  
raise exceptions.EndpointNotFound(msg)  
keystoneauth1.exceptions.catalog.EndpointNotFound: public endpoint for load-balancer service not found

fatal: [localhost]: FAILED! =\> {  
“changed”: false,  
“module\_stderr”: "Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1543834531.05-62995379178532/AnsiballZ\_os\_loadbalancer.py", line 113, in \n \_ansiballz\_main()\n File "/root/.ansible/tmp/ansible-tmp-1543834531.05-62995379178532/AnsiballZ\_os\_loadbalancer.py", line 105, in \_ansiballz\_main\n invoke\_module(zipped\_mod, temp\_path, ANSIBALLZ\_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1543834531.05-62995379178532/AnsiballZ\_os\_loadbalancer.py", line

Any helps could be appreciated.
