# Dynamic Inventories with Openstack

**URL:** <https://forum.ansible.com/t/dynamic-inventories-with-openstack/37128>\
**Category:** Ansible Project\
**Created:** [September 19, 2022, 4:25pm UTC](https://forum.ansible.com/t/dynamic-inventories-with-openstack/37128 "2022-09-19T16:25:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert2](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@Robert2](https://forum.ansible.com/u/Robert2)\
**Post date:** [September 19, 2022, 4:25pm UTC](https://forum.ansible.com/t/dynamic-inventories-with-openstack/37128/1 "2022-09-19T16:25:04Z")

</div>

Hello everyone,  
I am working on moving our playbooks from ansible 2.9 to 2.12+ and am having trouble understanding how to use plugin: openstack.cloud.openstack. I am sure it is something simple I am missing or using this wrong so hoping someone can point me in the right direction.

I have an openstack.yml file:  
**_plugin: openstack.cloud.openstack_**  
**_expand\_hostvars: yes_**  
**_fail\_on\_errors: yes_**  
**_all\_projects: yes_**

I run the command:  
ansible-inventory -i openstack.yml --list

and get the following error:  
**_[WARNING]: \* Failed to parse /home/rkruck/repos/my-stuff/ansible/openstack.yml_**  
**_with script plugin: problem running /home/rkruck/repos/my-_**  
**_stuff/ansible/openstack.yml --list ([Errno 8] Exec format error:_**  
**_‘/home/rkruck/repos/my-stuff/ansible/openstack.yml’)_**  
**_[WARNING]: \* Failed to parse /home/rkruck/repos/my-stuff/ansible/openstack.yml_**  
**_with auto plugin: openstacksdk is required for the OpenStack inventory plugin._**  
**_OpenStack inventory sources will be skipped._**  
**_[WARNING]: \* Failed to parse /home/rkruck/repos/my-stuff/ansible/openstack.yml_**  
**_with yaml plugin: Plugin configuration YAML file, not YAML inventory_**  
**_[WARNING]: \* Failed to parse /home/rkruck/repos/my-stuff/ansible/openstack.yml_**  
**_with ini plugin: Invalid host pattern ‘plugin:’ supplied, ending in ‘:’ is not_**  
**_allowed, this character is reserved to provide a port._**  
**_[WARNING]: Unable to parse /home/rkruck/repos/my-stuff/ansible/openstack.yml as_**  
**_an inventory source_**  
**_[WARNING]: No inventory was parsed, only implicit localhost is available_**  
**_{_**  
**_“\_meta”: {_**  
**_“hostvars”: {}_**  
**_},_**  
**_“all”: {_**  
**_“children”: [_**  
**_“ungrouped”_**  
**_]_**  
**_}_**  
**_}_**

I’m sure I am not understanding the proper use of how to use the plugin which is why I’m coming to you experts for help :).

v/r  
Robert

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [September 19, 2022, 11:22pm UTC](https://forum.ansible.com/t/dynamic-inventories-with-openstack/37128/2 "2022-09-19T23:22:55Z")

</div>

> Hello everyone,  
> I am working on moving our playbooks from ansible 2.9 to 2.12+ and am having trouble understanding how to use plugin: openstack.cloud.openstack. I am sure it is something simple I am missing or using this wrong so hoping someone can point me in the right direction.
> 
> I have an openstack.yml file:  
> **_plugin: openstack.cloud.openstack_**  
> **_expand\_hostvars: yes_**  
> **_fail\_on\_errors: yes_**  
> **_all\_projects: yes_**
> 
> I run the command:  
> ansible-inventory -i openstack.yml --list
> 
> and get the following error:  
> **_[WARNING]: \* Failed to parse /home/rkruck/repos/my-stuff/ansible/openstack.yml_**  
> **_with script plugin: problem running /home/rkruck/repos/my-_**  
> **_stuff/ansible/openstack.yml --list ([Errno 8] Exec format error:_**  
> **_‘/home/rkruck/repos/my-stuff/ansible/openstack.yml’)_**  
> **_[WARNING]: \* Failed to parse /home/rkruck/repos/my-stuff/ansible/openstack.yml_**  
> **_with auto plugin: openstacksdk is required for the OpenStack inventory plugin._**

This is a problem. Install that sdk and see if that fixes things
