Creating and Consuming Modules
Throughout this book, we have almost constantly referred to and made use of Ansible modules. We have treated these as black boxes – that is to say, we have just accepted that they exist and that they will work in a certain documented manner. However, one of the many great things about Ansible is that it is an open source project, and as such, not only can you view and modify its source code, but you can also develop your own additions. At the time of writing, there are 3,300+ modules available for Ansible, handling everything from simple commands such as copying files and installing packages to configuring highly complex and bespoke networking equipment. This large array of modules has grown out of a genuine need to solve problems with Ansible, and the number included with each release of Ansible increases every time.
Sooner or later, you will come across a specific piece of functionality that doesn’t exist in any of the current Ansible...