Bootstrap FreeKB - Ansible - Resolve "Error reading config file (ansible.cfg): File contains no section headers"
Ansible - Resolve "Error reading config file (ansible.cfg): File contains no section headers"

Updated:   |  Ansible articles

Let's say you are issuing a basic Ansible command, such as ansible --version to display the version of Ansible, and the following is returned.

Error reading config file (/etc/ansible/ansible.cfg): File contains no section headers.

 

As the error suggests, your ansible.cfg file is missing section headers. Appending [defaults] to line 1 of your ansible.cfg file should resolve this error.

[defaults]

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter d2fac5 in the box below so that we can be sure you are a human.