why do we disable gather_facts in ansible playbook.
When we execute an Ansible playbook by default it will gather facts of operating system first and then execute tasks listed in it. It’s always not required to gather facts & if we have too many hosts, it will take more time to execute a playbook. To mitigate this we need to disable gather facts with “gather_facts” attribute in ansible playbook but it’s not required
Exactly, this is just to improve performance.
So if you don’t need fact-gathering, disable it in your playbook by adding :