Apart from writing modules and external inventory script, you can also extend the core functionality of Ansible itself. This allows you to include even more functionality into Ansible using Python. By writing plugins for Ansible, you can do the following:
- Add new methods for controlling other machines with connection plugins
- Use data from external sources outside Ansible in loops or lookups with lookup plugins
- Add new filters for use with variables or in templates with filter plugins
- Include callbacks that run when certain actions happen inside Ansible with callback plugins
To add extra plugins to your Ansible projects, we create a Python file in the plugin directories specified in your
ansible.cfg file. Alternatively, we can add ...