Howto work with dynamic inventories but not cloud

22 views
Skip to first unread message

J M

unread,
Aug 29, 2023, 9:35:06 AM8/29/23
to Ansible Project
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
 
Reply all
Reply to author
Forward
0 new messages