In this chapter, we created a working Ansible module for security automation. We started by creating a sort of hello world module that didn't do much, but helped us understand the layout of what a module file could look like. We followed the instructions as per the Ansible developer guide on how to set up an environment for being able to do module development. We articulated our requirement from the module and picked OWASP ZAP as a possible candidate for creating the module.
Using the training wheels, such as the template from the developer docks, we created the module and we saw how to use it using Ansible CLI or a playbook. We added a couple more options to the original code so that we could make the module more useful and flexible. Now we have an OWASP ZAP Ansible module that can connect to any hosted OWASP ZAP that allows access with the API key and executes a...