Quick way to get the inventory of you host and write it to a file:
root@r6-410-1:/home/ubuntu# ansible all -i INVENTORY_FILE -m setup --tree /tmp/facts
This will print the inventory into terminal and write it into a file with the name of the file being the name of the machine listed in your inventory file. This could be either a FQDN or IP address. The file will be in JSON format as well for easy viewing. Enjoy!
Your comment will be posted after it is approved.
Leave a Reply. |
AuthorJames Benson is an IT professional. Archives
August 2022
Categories
All
|