Hi there
I'm looking for a way to get working the openstack plugin (not the old inventory script).
I've created a file `openstack.yml` and put the following content inside
```
---
plugin: openstack.cloud.openstack
expand_hostvars: true
cache: yes
```
then I sourced the file `openrc.sh` from one on the projects.
so I launch `ansible-inventory` and I get the following.
```
ansible-inventory -i openstack.yml --list
Expecting to find domain in user. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-a72df122-eed0-42b0-888c-e2f5c3201260)
```
Verbose output does not provide more information.
Ansible openstack inventory plugin not working
Related questions
- Dimensionnement serveur MySQL
40160
07.11.2018 12:32
- [RESOLU] Connexion impossible en SSH
33842
05.06.2019 20:05
- Bonjour, Je n'est reçus aucun mot de passe root lors de mon achat!
29521
05.02.2018 20:47
- Gitlab private docker registry
29109
16.03.2018 13:05
- Configuration IP failover avec netplan (Ubuntu 17.10)
27744
12.01.2018 23:23
- Ssh connection timed out port 22
26509
11.12.2019 08:21
- IP Failover sur Debian 9
26470
18.11.2016 20:40
- Problème connexion ssh
25563
04.02.2018 09:46
- Instance Public Cloud en "error"
23885
15.12.2025 10:04
- Connexion OpenStack Swift Object Storage
21069
11.04.2019 10:09
Hello @BertrandS11
For me, the issue could be linked to the user or the openrc.sh file used.
With quick and little search, I found this site :
https://support.platform9.com/hc/en-us/articles/360041408193-OpenStack-Commands-Fail-With-Expecting-to-Find-Domain-in-User-
In, a first time, could you check your openrc.sh file ?
You can also try to set the user password directly on the file.
For eg, instead of :
# With Keystone you pass the keystone password.
echo "Please enter your OpenStack Password: "
read -sr OS_PASSWORD_INPUT
export OS_PASSWORD=$OS_PASSWORD_INPUT
set with :
# With Keystone you pass the keystone password.
# echo "Please enter your OpenStack Password: "
# read -sr OS_PASSWORD_INPUT
export OS_PASSWORD=abcdefghijklmnopqrstuvwxyz1234567890
Then, you had to check the region used.
For information "GRA", "SBG" and the other region without number are for Object storage only (Swift global region).
You had to check on a Region available on your tenant like "GRA11", "SGP2", "UK1"...
Try to check if the Openstack variable are correctly set :
echo $OS_AUTH_URL
echo $OS_IDENTITY_API_VERSION
echo $OS_REGION_NAME
echo $OS_USERNAME
echo $OS_PASSWORD
echo $OS_PROJECT_NAME
echo $OS_PROJECT_DOMAIN_ID
After all of this, if the issue remain, try to create a new openstack user with only "Administrator" grants.
Finally, if in any case all this does not solve the problem, I do not know enough ansible to help more... :/
Jalinn
Hi, and sorry for late reply (I did not received notification that someone replied to my question)
I can't access the article from platform9.com it seems I need to be registered.
`openrc.sh` seems to be good (region properly set, and correct password) because I was able to retrieve the inventory using the script `openstack-inventory.py` which seems to come with `openstack-client` python module.
At the end, I've switched the `openrch.sh` to a `clouds.yml` format (and which allows me to query several regions at the same time), and it worked.