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, 2020 in Ansible by akhtar
• 38,170 points
2,488 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, 2020 by MD
• 95,180 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, 2020 in Ansible by MD
• 95,180 points
874 views
0 votes
1 answer

How to skip execution of a task in ansible playbook ??

Define tags...  Then while running playbook use --skip-tags. READ MORE

answered Sep 30, 2020 in Ansible by Adil
3,232 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
• 7,320 points
2,867 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
2,129 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
1,076 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, 2020 in Ansible by MD
• 95,180 points
4,927 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, 2020 in Ansible by MD
• 95,180 points
649 views