How to Use Ansible to Determine differing features of a Machine

Hello community

Can someone let me know how to use ansible to determine the differences between two machines.

For example, lets say I don’t have any idea how a particular linux server is built. However, I know how to use Ansible to build a machine with over 100 different features.

Is it possible to use Ansible to let me know the features of machine so that I can build those features using Ansible to another machine.

Sorry if this question is a little confusing, but I hope you know what I’m getting at.

Regards

Hello,

Can someone let me know how to use ansible to determine the differences
between two machines.

Have a look at all the facts that ansible knows about a host by
running:

$ ansible target-hostname -m setup

If there is some attribute of the host that is important to you but
isn't currently in the available facts then you could make a custom
fact:

<https://medium.com/@jezhalford/ansible-custom-facts-1e1d1bf65db8&gt;

You can then use the facts as variables in your tasks and templates
in order to do different things.

Cheers,
Andy