What does Fact mean in Ansible

0 votes

Hi Guys,

I am new in Ansible. I don't know too much about gathering_fact tasks in Ansible. Can anyone tell me what does Fact mean in Ansible?

Aug 11, 2020 in Ansible by akhtar
• 38,210 points

1 answer to this question.

0 votes


When any new variable about the system has been discovered it’s considered to be a “fact” in the playbook. Facts are mainly used to implement conditional executions. It can also be used to get ad-hoc information about the system.

You can get facts with the following command.

$ ansible all- m setup

So when you want to extract only a part of the information, you use the setup module to filter out only the needed information.

answered Aug 11, 2020 by MD
• 95,300 points

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer

How to configure fact caching in Ansible?

There are two cache plugins: redis and jsonfile. To ...READ MORE

answered Jan 24, 2019 in Ansible by Kennedy
0 votes
1 answer

What is the difference between the host file and an inventory file in ansible?

Actually both are same. hosts file is ...READ MORE

answered Feb 12, 2019 in Ansible by Amith
• 140 points
0 votes
1 answer

what does ansible-vault edit command do?

Hey @Faizal, your worry is obvious in ...READ MORE

answered Feb 11, 2019 in Ansible by Mariam
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
0 votes
1 answer

What is a template in Ansible?

Hi@akhtar, Managing configurations of multiple servers and environments are ...READ MORE

answered Aug 2, 2020 in Ansible by MD
• 95,300 points
0 votes
1 answer

What is the ask_pass module in Ansible?

Hi@akhtar, Ask_pass is the control module in an ...READ MORE

answered Aug 11, 2020 in Ansible by MD
• 95,300 points