How Do You Troubleshoot the Ansible Message “AnsibleOptionsError…ansible.cfg…File contains no section headers”?

Problem scenario
You try to run an Ansible playbook but you get this error "AnsibleOptionsError...ansible.cfg...File contains no section headers"

Your ansible.cfg file has headers. What should you do?

Solution
Eliminate indentations.  The [header] should be on the far left of the screen with no leading spaces.

Leave a comment

Your email address will not be published. Required fields are marked *