# 2.4 inventory example?

**URL:** <https://forum.ansible.com/t/2-4-inventory-example/25886>\
**Category:** Ansible Project\
**Created:** [November 1, 2017, 3:39pm UTC](https://forum.ansible.com/t/2-4-inventory-example/25886 "2017-11-01T15:39:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brantley\_West](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@Brantley\_West](https://forum.ansible.com/u/Brantley_West)\
**Post date:** [November 1, 2017, 3:39pm UTC](https://forum.ansible.com/t/2-4-inventory-example/25886/1 "2017-11-01T15:39:05Z")

</div>

Hello,

It seems the developing\_api.rst page ([https://github.com/ansible/ansible/blob/v2.4.1.0-1/docs/docsite/rst/dev\_guide/developing\_api.rst](https://github.com/ansible/ansible/blob/v2.4.1.0-1/docs/docsite/rst/dev_guide/developing_api.rst)) is outdated due to the 2.4 inventory changes. Are there any tips for doing simple inventory manipulation via Python with Ansible 2.4? Thanks!

-bw

---

<div class="post-metadata">

**Author:** ![Andrew\_Latham](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Post date:** [November 1, 2017, 4:11pm UTC](https://forum.ansible.com/t/2-4-inventory-example/25886/2 "2017-11-01T16:11:51Z")

</div>

Looks like some doc-strings around [https://github.com/ansible/ansible/blob/stable-2.4/lib/ansible/inventory/manager.py#L119](https://github.com/ansible/ansible/blob/stable-2.4/lib/ansible/inventory/manager.py#L119) would be helpful. The code is there so you can read about what is needed. #yeahopensource

---

<div class="post-metadata">

**Author:** ![Brantley\_West](https://avatars.discourse-cdn.com/v4/letter/b/b2d939/32.png) [@Brantley\_West](https://forum.ansible.com/u/Brantley_West)\
**Post date:** [November 6, 2017, 6:37pm UTC](https://forum.ansible.com/t/2-4-inventory-example/25886/3 "2017-11-06T18:37:01Z")

</div>

The Ansible inventory documentation was not helpful. Ultimately I got it working, albeit with a nuisance warning using [https://gist.github.com/cbwest3/cb4e9ac16261595a82f8b4ab54629bac](https://gist.github.com/cbwest3/cb4e9ac16261595a82f8b4ab54629bac).

-bw
