I also want to formally go over this object model here.
We've got collection, role, and module.
In the innermost scope, you've got the module.
And then you put modules in your playbooks or your roles, either way.
But normally you'd have your playbook,
and then your playbooks are folded into roles.
And then this slide shows you that above the role is the collection.
I know that when I was first learning Ansible,
I got a little hung up on the vocabulary because it's so rigid.
But the good news is that it doesn't change.
So once you know it, you know it.
So, once again,
you'll find that collections are groups of custom or off‑the‑shelf roles.
Roles consist of decomposed playbooks.
Those playbooks call modules, and modules have tasks.
This shows some sample code of using the ansible‑galaxy command,
the CLI command.
So first,
we've got making sure that we've got access to the ansible.windows
collections. And it shows us how to install, search.
And then ultimately,
once you've isolated and downloaded and installed a role or a collection,
you would then include the role in your playbook.
As you can see, this sample task is called Configure IIS settings.
And include_role would be the name of the custom role that you
either made yourself or downloaded from Galaxy.
And then within it,
you can then consume tasks from that role just like you
would an Ansible‑provided built‑in role.