# Not able to fetch ansible inventary list from azure cloud

**URL:** <https://forum.ansible.com/t/not-able-to-fetch-ansible-inventary-list-from-azure-cloud/45460>\
**Category:** Get Help\
**Tags:** azure\
**Created:** [March 1, 2026, 6:41am UTC](https://forum.ansible.com/t/not-able-to-fetch-ansible-inventary-list-from-azure-cloud/45460 "2026-03-01T06:41:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarun](https://avatars.discourse-cdn.com/v4/letter/t/ce7236/32.png) [@tarun](https://forum.ansible.com/u/tarun)\
**Post date:** [March 1, 2026, 6:41am UTC](https://forum.ansible.com/t/not-able-to-fetch-ansible-inventary-list-from-azure-cloud/45460/1 "2026-03-01T06:41:48Z")

</div>

```auto
shyam@DESKTOP-OO7EVK2:~/ansible-project$ **ansible-inventory --list**
[WARNING]: Collection azure.azcollection does not support Ansible version 2.15.13
[WARNING]: * Failed to parse /home/shyam/ansible-project/azure_rm.yml with
ansible_collections.azure.azcollection.plugins.inventory.azure_rm plugin: name 'azure_cloud' is not defined
[WARNING]: * Failed to parse /home/shyam/ansible-project/azure_rm.yml with auto plugin: name 'azure_cloud' is not defined
[WARNING]: * Failed to parse /home/shyam/ansible-project/azure_rm.yml with yaml plugin: Plugin configuration YAML file, not YAML inventory 
[WARNING]: * Failed to parse /home/shyam/ansible-project/azure_rm.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/shyam/ansible-project/azure_rm.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
{
    "_meta": {
        "hostvars": {}
    },
    "all": {
        "children": [
            "ungrouped"
        ]
    }
}

```

here is my inventary plugin file:

```auto
plugin: azure.azcollection.azure_rm
include_vm_resource_groups:
  - NextOpsRG03
auth_source: auto
keyed_groups:
  - prefix: tag
    key: tags
hostnames:
  - public_ip_address

```

I set up all env varibales but still failing with above error

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [March 1, 2026, 7:02am UTC](https://forum.ansible.com/t/not-able-to-fetch-ansible-inventary-list-from-azure-cloud/45460/2 "2026-03-01T07:02:39Z")

</div>

This might be related: [name 'azure\_cloud' is not defined · Issue #1339 · ansible-collections/azure · GitHub](https://github.com/ansible-collections/azure/issues/1339)

You might want to run ansible-inventory with more verbosity to find out more precisely where the `name 'azure_cloud' is not defined` error comes from. My guess (from some of the tracebacks in that issue) is that [azure/plugins/module\_utils/azure\_rm\_common.py at dev · ansible-collections/azure · GitHub](https://github.com/ansible-collections/azure/blob/dev/plugins/module_utils/azure_rm_common.py#L314) is ultimately not there, which is likely connected to the `azure`’s Python library’s version you have installed.
