Chapter 6. Ansible Modules
So far, we have defined tasks that ultimately end up executing some type of operation in the local (control) or remote (managed) hosts.
These operations invoke modules. So far in this book, you have already used a variety of modules without knowing it.
For example, you used the ansible.builtin.file
(or file
in short form) module to create a directory on the remote host.
You have also used other file related modules to copy a file from the local host to the remote host.
In this chapter, we will cover in detail what modules are, how to retrieve their associated documentation, and finally, how to develop a new module.
What is a Module?
Ansible modules are standalone scripts that execute one specific action.
Ansible modules let Ansible developers abstract complexity and provide Ansible users with an easier way to execute automation tasks without needing to be concerned with the actions being performed. For ...
Get Red Hat Certified Engineer (RHCE) Ansible Automation Study Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.