# Howto work with dynamic inventories but not cloud

**URL:** <https://forum.ansible.com/t/howto-work-with-dynamic-inventories-but-not-cloud/38386>\
**Category:** Ansible Project\
**Created:** [August 29, 2023, 8:57am UTC](https://forum.ansible.com/t/howto-work-with-dynamic-inventories-but-not-cloud/38386 "2023-08-29T08:57:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesarjorgemartinez](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/cesarjorgemartinez/32/163_2.png) [@cesarjorgemartinez](https://forum.ansible.com/u/cesarjorgemartinez)\
**Post date:** [August 29, 2023, 8:57am UTC](https://forum.ansible.com/t/howto-work-with-dynamic-inventories-but-not-cloud/38386/1 "2023-08-29T08:57:47Z")

</div>

Hi,

I’m use inventory files with Ansible as:  
inventory/fileinventory.yml

As example:  
myansible:  
hosts:  
host1:  
ansible\_host: x.y.z.t  
ansible\_port: …  
myinventoryvar: xyz  
etc…

But I ask if exist a form to pass one inventory text without grab the file and then pass  
-i INVENTORY, --inventory INVENTORY, --inventory-file INVENTORY  
specify inventory host path or comma separated host list. --inventory-file is deprecated

I can pass hosts as separated host list, but howto pass all data for a one host as like the example?

Regards,  
Cesar Jorge
