I had an issue with one of my Ansible modules recently and needed to make a change so I needed to locate the Python module.
It was onto google searching “Where are Ansbile Modules Stored?” I could not find any information around this question.
So after a lot of research I found the answer and will detail it below.
Where are Ansible Modules Stored?
Ansible modules are basically blocks of Python code and the one I needed to edit was ios_config.py
I am running Ansible on Ubuntu so I just run one simple command

locate ios_config.py
This brings back the following result
/usr/lib/python2.7/dist-packages/ansible/modules/core/network/ios/ios_config.py
So I just need to go to this location and edit the file!
Where are Ansible Playbooks Stored?
By default most of the time people will save playbooks in the root of the ansible folder /etc/ansible
But Ansible playbooks can be stored anywhere – I personally store mine in /etc/ansible/playbooks
More Ansible Tutorials

If you enjoyed this then please check out my other Ansible posts:
- Ansible Cisco Tutorial – Router Configuration Backup
- Ansible Hosts File
- Ansible vs Python – Which one should you learn?
- Ansible Vault
- Cisco IOS upgrade using Ansible
- AnsibleFest London Review
- How to install Ansible Tower
- What are the advantages of using Ansible Roles
- What is Ansible?
- Ansible IOS Command Example