# Why can’t I use \`inventory.development.yml\` as my inventory file name?

**URL:** <https://forum.ansible.com/t/why-can-t-i-use-inventory-development-yml-as-my-inventory-file-name/46865>\
**Category:** Get Help\
**Tags:** community-general\
**Created:** [December 1, 2026, 9:37pm UTC](https://forum.ansible.com/t/why-can-t-i-use-inventory-development-yml-as-my-inventory-file-name/46865 "2026-12-01T21:37:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/andrew/32/11696_2.png) [@Andrew](https://forum.ansible.com/u/Andrew)\
**Post date:** [December 1, 2026, 9:37pm UTC](https://forum.ansible.com/t/why-can-t-i-use-inventory-development-yml-as-my-inventory-file-name/46865/1 "2026-12-01T21:37:25Z")

</div>

[`community.general.incus`](https://docs.ansible.com/projects/ansible/devel/collections/community/general/incus_inventory.html) imposes [a constraint](https://github.com/ansible-collections/community.general/blob/14.1.0/plugins/inventory/incus.py#L109-L112) on the inventory file name:

> its filename must end in `incus.yml` or `incus.yaml`.

Why?

---

<div class="post-metadata">

**Author:** ![Rei\_Kurosawa](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@Rei\_Kurosawa](https://forum.ansible.com/u/Rei_Kurosawa)\
**Post date:** [December 1, 2026, 9:52pm UTC](https://forum.ansible.com/t/why-can-t-i-use-inventory-development-yml-as-my-inventory-file-name/46865/2 "2026-12-01T21:52:27Z")

</div>

The incus inventory plugin’s `verify_file` only accepts paths ending in `incus.yml` or `incus.yaml`, so that plugin skips `inventory.development.yml`. The Ansible developer guide describes `verify_file` as a quick check of whether an inventory source is usable by the plugin. It adds that plugins screen for specific file name patterns to avoid attempting to consume any valid YAML file. For YAML configuration files, the guide says a suffix of the plugin name plus yml or yaml should be accepted.  
Assisted-by: AI.

---

<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:** [December 1, 2026, 10:13pm UTC](https://forum.ansible.com/t/why-can-t-i-use-inventory-development-yml-as-my-inventory-file-name/46865/3 "2026-12-01T22:13:16Z")

</div>

While this AI generated answer answers the obvious “why” part, the more interesting “why” part isn’t answered: where does this condition come from, which appears in most inventory plugins? It has been there since I got interested in inventory plugins (first when reviewing them, later when maintaining/creating them). Maybe it’s just cargo cult, though I guess the reason is more likely that originally this was the only way for Ansible to figure out which inventory plugin can handle which files. (Now there’s the `plugin` key, which all inventory plugins I’m aware of require to be present and set to a plugin-specific value, which usually is its FQCN.)

Maybe someone who has been around for longer knows where the conditions on the filenames come from?

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [December 1, 2026, 10:36pm UTC](https://forum.ansible.com/t/why-can-t-i-use-inventory-development-yml-as-my-inventory-file-name/46865/4 "2026-12-01T22:36:58Z")

</div>

Until the addition of the [auto](https://github.com/ansible/ansible/commit/5ff36c34234198a5f143b726727bb8db664afb0e) inventory plugin, there was no `plugin` key to link an inventory file directly to an inventory plugin.

As such, the `verify_file` method of an inventory plugin was the only mechanism that could allow a plugin to reject or utilize an inventory file based on a configuration that included multiple inventories, usually in a directory like `-i inventory/`, such as:

`INVENTORY_ENABLED: ['host_list', 'script', 'openstack', 'yaml', 'ini']`

That would result in:

1. Use `host_list` plugin if the provided inventory was not a file, and contained a `,` in the string
2. Use `script` plugin if the inventory was executable or contained a shebang
3. Use the `openstack` plugin if it ended in `openstack.yaml`, `openstack.yml`, `clouds.yaml`, `clouds.yml`
4. Use `yaml` if the plugin ended with `.yaml`/`.yml`
5. Use `ini` as the last case

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [December 1, 2026, 10:43pm UTC](https://forum.ansible.com/t/why-can-t-i-use-inventory-development-yml-as-my-inventory-file-name/46865/5 "2026-12-01T22:43:21Z")

</div>

Once `auto` was added, the above example I provided could be:

`INVENTORY_ENABLED: ['host_list', 'script', 'auto', 'yaml', 'ini']`

And then in the `whatever.openstack.yaml` you added `plugin: openstack` it would use that `plugin` key instead of the file ending in `openstack.yaml`.

However, the ability to use the `plugin` key requires the use of the `auto` inventory plugin, and as this is configurable, it cannot be expected to always be enabled.

As a result, we’ve fallen into a category where the filename must match in this manner regardless of the `auto` plugin. Both to support older inventory files, and to support not having `auto` enabled.

---

<div class="post-metadata">

**Author:** ![blenser4](https://avatars.discourse-cdn.com/v4/letter/b/bbce88/32.png) [@blenser4](https://forum.ansible.com/u/blenser4)\
**Post date:** [December 2, 2026, 12:11am UTC](https://forum.ansible.com/t/why-can-t-i-use-inventory-development-yml-as-my-inventory-file-name/46865/6 "2026-12-02T00:11:36Z")

</div>

Thanks for tracing this back to the history of the auto plugin. The filename rule makes more sense now as a way to keep older inventory files working even when auto is not enabled.
