To be able to follow the examples in this chapter, you will need a UNIX machine capable of building RPM packages. My suggestion would be a Fedora or CentOS installation (either bare metal or in a virtual machine).
You can download all the files from this book's GitHub repository at https://github.com/PacktPublishing/Learning-Ansible-2.X-Third-Edition/tree/master/Chapter09.