# Azure Dynamic Inventory Issue

**URL:** <https://forum.ansible.com/t/azure-dynamic-inventory-issue/2644>\
**Category:** Get Help\
**Tags:** azure, aws, collections, awx\
**Created:** [November 30, 2023, 6:51am UTC](https://forum.ansible.com/t/azure-dynamic-inventory-issue/2644 "2023-11-30T06:51:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ku1918](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@ku1918](https://forum.ansible.com/u/ku1918)\
**Post date:** [November 30, 2023, 6:51am UTC](https://forum.ansible.com/t/azure-dynamic-inventory-issue/2644/1 "2023-11-30T06:51:22Z")

</div>

Hi,

I would like to understand if these issue present for everyone who using Azure Resource Manager for inventory.

I have configure the following sync.

```auto
---
keyed_groups:
  - key: tags.Environment
    separator: ""
  - key: powerstate
    separator: ""
  - key: image.offer
    separator: ""
hostnames:
    - name
hostvar_expressions:
    csp: "'azure'"

```

Few issue:

1. it doesn’t capture the virtual machine if the machine in stopped state
2. it override the host inventory. I have disable certain host before syncing. Once I sync , host are back to “enabled” state. This does not happen with AWS plugin. So I would like to know if this is a Azure RM plugin issue.

Hence,

1. I would like to know how I can capture the stopped state of the VM.
2. How to preserve host that has been disable after sync.

Any ideas would be helpful.

Thanks.

---

<div class="post-metadata">

**Author:** ![akira6592](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akira6592/32/222_2.png) [@akira6592](https://forum.ansible.com/u/akira6592)\
**Post date:** [December 8, 2023, 12:39pm UTC](https://forum.ansible.com/t/azure-dynamic-inventory-issue/2644/2 "2023-12-08T12:39:18Z")

</div>

Hello @ku1918 .

For issue1, can you try [`default_host_filters`](https://docs.ansible.com/ansible/latest/collections/azure/azcollection/azure_rm_inventory.html#parameter-default_host_filters) option?

```yaml
default_host_filters: [] # specifying empty list

```
