Ansible inventory in one remote machine using command-line

Spread the Knowledge

You can specify inventory file host path or comma separated host list. Except “localhost”, you can always specify a inventory using “-i INVENTORY” or –inventory=INVENTORY.

Also, there are two default groups: all and ungrouped. “all” contains every host of the inventory file host path or comma separated host list and “ungrouped” contains all hosts that don’t have another group aside from all.

Here is the example of one remote machine inventory using ansible adhoc program.

Here is the example of one remote machine inventory using ansible inventory