Modules: Ansible tasks contain a name, a module and parameters for the module. In the following example, the "ansible.builtin.debug" module is used and this is documented here. In the background, Ansible executes Python code to execute the defined task.
- name: Display message # Name
ansible.builtin.debug: # Module
msg: "This is a test message." # Parameter
Roles: Useful to bundle Ansible tasks and with many functions like handlers (special form of ansible tasks that are executed towards the end of a role in certain conditions) to structure tasks.
Playbook: Top-level structure which is executed by Ansible and executes roles on defined hosts.
------------------------------
Niklas
System Engineer UNIX and Linux on Power
------------------------------