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,240 points
12,399 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,380 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,380 points
5,293 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
7,176 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 17, 2018 in Ansible by shubham
• 7,320 points
4,070 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,907 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
2,065 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,380 points
10,825 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,380 points
3,056 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP