Ansible Modules

Ansible has built-in modules for a great number of tasks. In the last lab we used the built-in package module to install software. The documentation for ansible is very useful.

Browse to https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/package_module.html#ansible-collections-ansible-builtin-package-module

Here you will see the documentation for the package module. The docs show parameters and attributes, include what’s required and what default values are. It also has a good examples section that give practical use cases for the module.

Here is the list of the built-in modules: https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/index.html

We’ll use the copy, template and lineinfile modules coming up to make changes to file on the target systems.

In addition to all the ansible provided modules, there’s a collection of community provided modules called ansible galaxy: https://galaxy.ansible.com/ui/collections/

These must be downloaded and added individually as needed. If you search the collections for your hardware provider of choice, you will most likely find a module here.