How to turn gathering facts task off in Ansible?

0 votes

Hi Guys,

I am new in Ansible. Whenever I try to run any playbook, gathering facts task will automatically run. How can I disable this task?

Aug 10 in Ansible by akhtar
• 25,030 points
109 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use gather_facts: no keyword in your playbook. It will disable this task automatically. You can also see the below playbook for more understanding.

- hosts: server
  gather_facts: no
  tasks:
  - name: Install httpd module
    package:
      name: httpd
      state: present
answered Aug 10 by MD
• 56,480 points

Related Questions In Ansible

0 votes
1 answer

How to run a playbook from a specific task in Ansible?

Hi@akhtar, The --start-at-task option allows you to start ...READ MORE

answered Sep 15 in Ansible by MD
• 56,480 points
20 views
0 votes
1 answer

How to regex replace nested values in Ansible

I'm not aware of any built-in method ...READ MORE

answered Jun 16, 2018 in Ansible by shubham
• 6,910 points
2,224 views
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
1,610 views
0 votes
1 answer

How to ignore failed commands in Ansible?

Usually, if even one command fails to ...READ MORE

answered Feb 7, 2019 in Ansible by Patt
9,184 views
+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
677 views
+2 votes
1 answer
0 votes
1 answer

How to capture the output of a task in Ansible Playbook?

Hi@akhtar, Ansible registers module used to capture/store the ...READ MORE

answered Aug 2 in Ansible by MD
• 56,480 points
241 views
0 votes
1 answer

How to give a task name in Ansible?

Hi@akhtar, You can give the task name in ...READ MORE

answered Aug 2 in Ansible by MD
• 56,480 points
66 views