Modules and plugins
A role can include custom modules as well as plugins. While the Ansible project is quite good at reviewing and accepting submitted modules, there are certain cases where it may not be advisable or even legal to submit a custom module upstream. In those cases, delivering the module with the role may be a better option. Modules can be loaded from roles/<role_name>/library/ and can be used by any task in the role, or any later role. Modules provided in this path will override any other copies of the same module name anywhere else on the filesystem, which can be a way to distribute added functionality to a core module before the functionality has been accepted upstream and released with a new version of Ansible.
Likewise, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access