# How to Use Ansible to Determine differing features of a Machine

**URL:** <https://forum.ansible.com/t/how-to-use-ansible-to-determine-differing-features-of-a-machine/27564>\
**Category:** Ansible Project\
**Created:** [May 18, 2018, 10:30pm UTC](https://forum.ansible.com/t/how-to-use-ansible-to-determine-differing-features-of-a-machine/27564 "2018-05-18T22:30:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlton\_Patterson1](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@Carlton\_Patterson1](https://forum.ansible.com/u/Carlton_Patterson1)\
**Post date:** [May 18, 2018, 10:30pm UTC](https://forum.ansible.com/t/how-to-use-ansible-to-determine-differing-features-of-a-machine/27564/1 "2018-05-18T22:30:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andy\_Smith](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@Andy\_Smith](https://forum.ansible.com/u/Andy_Smith)\
**Post date:** [May 19, 2018, 6:07pm UTC](https://forum.ansible.com/t/how-to-use-ansible-to-determine-differing-features-of-a-machine/27564/2 "2018-05-19T18:07:49Z")

</div>

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](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
